mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use DebugInFunction macro
This commit is contained in:
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -175,11 +175,9 @@ void Foam::radiation::laserDTRM::initialise()
|
|||||||
const vector lPosition = focalLaserPosition_->value(t);
|
const vector lPosition = focalLaserPosition_->value(t);
|
||||||
const vector lDir = normalised(laserDirection_->value(t));
|
const vector lDir = normalised(laserDirection_->value(t));
|
||||||
|
|
||||||
if (debug)
|
DebugInfo
|
||||||
{
|
<< "Laser position : " << lPosition << nl
|
||||||
Info << "Laser position : " << lPosition << endl;
|
<< "Laser direction : " << lDir << endl;
|
||||||
Info << "Laser direction : " << lDir << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find a vector on the area plane. Normal to laser direction
|
// Find a vector on the area plane. Normal to laser direction
|
||||||
vector rArea = Zero;
|
vector rArea = Zero;
|
||||||
|
|||||||
@ -1091,8 +1091,7 @@ const Foam::pointField& Foam::polyMesh::oldPoints() const
|
|||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
WarningInFunction
|
WarningInFunction << endl;
|
||||||
<< endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
oldPointsPtr_.reset(new pointField(points_));
|
oldPointsPtr_.reset(new pointField(points_));
|
||||||
@ -1108,12 +1107,9 @@ Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints
|
|||||||
const pointField& newPoints
|
const pointField& newPoints
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Moving points for time " << time().value()
|
<< "Moving points for time " << time().value()
|
||||||
<< " index " << time().timeIndex() << endl;
|
<< " index " << time().timeIndex() << endl;
|
||||||
}
|
|
||||||
|
|
||||||
if (newPoints.size() != points_.size())
|
if (newPoints.size() != points_.size())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -42,10 +42,7 @@ bool Foam::polyMesh::checkFaceOrthogonality
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking mesh non-orthogonality" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking mesh non-orthogonality" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
const labelList& own = faceOwner();
|
const labelList& own = faceOwner();
|
||||||
const labelList& nei = faceNeighbour();
|
const labelList& nei = faceNeighbour();
|
||||||
@ -179,10 +176,7 @@ bool Foam::polyMesh::checkFaceSkewness
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking face skewness" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking face skewness" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
const labelList& own = faceOwner();
|
const labelList& own = faceOwner();
|
||||||
const labelList& nei = faceNeighbour();
|
const labelList& nei = faceNeighbour();
|
||||||
@ -283,10 +277,7 @@ bool Foam::polyMesh::checkEdgeAlignment
|
|||||||
// Empty direction info is passed in as a vector of labels (synchronised)
|
// Empty direction info is passed in as a vector of labels (synchronised)
|
||||||
// which are 1 if the direction is non-empty, 0 if it is.
|
// which are 1 if the direction is non-empty, 0 if it is.
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction << "Checking edge alignment" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking edge alignment" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
label nDirs = 0;
|
label nDirs = 0;
|
||||||
for (direction cmpt=0; cmpt<vector::nComponents; cmpt++)
|
for (direction cmpt=0; cmpt<vector::nComponents; cmpt++)
|
||||||
@ -413,10 +404,7 @@ bool Foam::polyMesh::checkCellDeterminant
|
|||||||
{
|
{
|
||||||
const scalar warnDet = 1e-3;
|
const scalar warnDet = 1e-3;
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction << "Checking for under-determined cells" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking for under-determined cells" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
tmp<scalarField> tcellDeterminant = primitiveMeshTools::cellDeterminant
|
tmp<scalarField> tcellDeterminant = primitiveMeshTools::cellDeterminant
|
||||||
(
|
(
|
||||||
@ -491,10 +479,7 @@ bool Foam::polyMesh::checkFaceWeight
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking for low face interpolation weights" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking for low face interpolation weights" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
tmp<scalarField> tfaceWght = polyMeshTools::faceWeights
|
tmp<scalarField> tfaceWght = polyMeshTools::faceWeights
|
||||||
(
|
(
|
||||||
@ -580,10 +565,7 @@ bool Foam::polyMesh::checkVolRatio
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking for volume ratio < " << minRatio << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking for volume ratio < " << minRatio << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
tmp<scalarField> tvolRatio = polyMeshTools::volRatio(*this, cellVols);
|
tmp<scalarField> tvolRatio = polyMeshTools::volRatio(*this, cellVols);
|
||||||
scalarField& volRatio = tvolRatio.ref();
|
scalarField& volRatio = tvolRatio.ref();
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -37,10 +38,7 @@ License
|
|||||||
|
|
||||||
void Foam::polyMesh::removeBoundary()
|
void Foam::polyMesh::removeBoundary()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Removing boundary patches." << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Removing boundary patches." << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove the point zones
|
// Remove the point zones
|
||||||
boundary_.clear();
|
boundary_.clear();
|
||||||
@ -54,10 +52,7 @@ void Foam::polyMesh::removeBoundary()
|
|||||||
|
|
||||||
void Foam::polyMesh::clearGeom()
|
void Foam::polyMesh::clearGeom()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Clearing geometric data" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Clearing geometric data" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clear all geometric mesh objects
|
// Clear all geometric mesh objects
|
||||||
meshObject::clear<pointMesh, GeometricMeshObject>(*this);
|
meshObject::clear<pointMesh, GeometricMeshObject>(*this);
|
||||||
@ -82,12 +77,10 @@ void Foam::polyMesh::updateGeom
|
|||||||
autoPtr<labelIOList>& newTetBasePtIsPtr
|
autoPtr<labelIOList>& newTetBasePtIsPtr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
<< "Updating geometric data with newPoints:"
|
||||||
InfoInFunction << "Updating geometric data with newPoints:"
|
|
||||||
<< newPoints.size() << " newTetBasePtIs:"
|
<< newPoints.size() << " newTetBasePtIs:"
|
||||||
<< newTetBasePtIsPtr.valid() << endl;
|
<< newTetBasePtIsPtr.valid() << endl;
|
||||||
}
|
|
||||||
|
|
||||||
if (points_.size() != 0 && points_.size() != newPoints.size())
|
if (points_.size() != 0 && points_.size() != newPoints.size())
|
||||||
{
|
{
|
||||||
@ -158,11 +151,8 @@ void Foam::polyMesh::updateGeom
|
|||||||
|
|
||||||
void Foam::polyMesh::clearAddressing(const bool isMeshUpdate)
|
void Foam::polyMesh::clearAddressing(const bool isMeshUpdate)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Clearing topology isMeshUpdate:" << isMeshUpdate << endl;
|
<< "Clearing topology isMeshUpdate:" << isMeshUpdate << endl;
|
||||||
}
|
|
||||||
|
|
||||||
if (isMeshUpdate)
|
if (isMeshUpdate)
|
||||||
{
|
{
|
||||||
@ -238,10 +228,7 @@ void Foam::polyMesh::clearOut()
|
|||||||
|
|
||||||
void Foam::polyMesh::clearTetBasePtIs()
|
void Foam::polyMesh::clearTetBasePtIs()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Clearing tet base points" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Clearing tet base points" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
tetBasePtIsPtr_.clear();
|
tetBasePtIsPtr_.clear();
|
||||||
}
|
}
|
||||||
@ -249,10 +236,7 @@ void Foam::polyMesh::clearTetBasePtIs()
|
|||||||
|
|
||||||
void Foam::polyMesh::clearCellTree()
|
void Foam::polyMesh::clearCellTree()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Clearing cell tree" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Clearing cell tree" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
cellTreePtr_.clear();
|
cellTreePtr_.clear();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2018 OpenCFD Ltd.
|
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -526,10 +526,8 @@ Foam::polyMesh::polyMesh
|
|||||||
curMotionTimeIndex_(time().timeIndex()),
|
curMotionTimeIndex_(time().timeIndex()),
|
||||||
oldPointsPtr_(nullptr)
|
oldPointsPtr_(nullptr)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInfo
|
||||||
{
|
<< "Constructing polyMesh from cell and boundary shapes." << endl;
|
||||||
Info<<"Constructing polyMesh from cell and boundary shapes." << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Calculate faces and cells
|
// Calculate faces and cells
|
||||||
labelList patchSizes;
|
labelList patchSizes;
|
||||||
@ -808,10 +806,8 @@ Foam::polyMesh::polyMesh
|
|||||||
curMotionTimeIndex_(time().timeIndex()),
|
curMotionTimeIndex_(time().timeIndex()),
|
||||||
oldPointsPtr_(nullptr)
|
oldPointsPtr_(nullptr)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInfo
|
||||||
{
|
<< "Constructing polyMesh from cell and boundary shapes." << endl;
|
||||||
Info<<"Constructing polyMesh from cell and boundary shapes." << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Calculate faces and cells
|
// Calculate faces and cells
|
||||||
labelList patchSizes;
|
labelList patchSizes;
|
||||||
@ -940,7 +936,7 @@ Foam::polyMesh::polyMesh
|
|||||||
{
|
{
|
||||||
if (checkMesh())
|
if (checkMesh())
|
||||||
{
|
{
|
||||||
Info << "Mesh OK" << endl;
|
Info<< "Mesh OK" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -29,6 +29,7 @@ License
|
|||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "cellIOList.H"
|
#include "cellIOList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::polyMesh::setInstance
|
void Foam::polyMesh::setInstance
|
||||||
@ -37,10 +38,7 @@ void Foam::polyMesh::setInstance
|
|||||||
const IOobject::writeOption wOpt
|
const IOobject::writeOption wOpt
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Resetting file instance to " << inst << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Resetting file instance to " << inst << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
points_.writeOpt() = wOpt;
|
points_.writeOpt() = wOpt;
|
||||||
points_.instance() = inst;
|
points_.instance() = inst;
|
||||||
@ -76,10 +74,7 @@ void Foam::polyMesh::setInstance
|
|||||||
|
|
||||||
Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
|
Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Updating mesh based on saved data." << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Updating mesh based on saved data." << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find the point and cell instance
|
// Find the point and cell instance
|
||||||
fileName pointsInst(time().findInstance(meshDir(), "points"));
|
fileName pointsInst(time().findInstance(meshDir(), "points"));
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -32,10 +32,7 @@ License
|
|||||||
|
|
||||||
void Foam::polyMesh::initMesh()
|
void Foam::polyMesh::initMesh()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "initialising primitiveMesh" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "initialising primitiveMesh" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// For backward compatibility check if the neighbour array is the same
|
// For backward compatibility check if the neighbour array is the same
|
||||||
// length as the owner and shrink to remove the -1s padding
|
// length as the owner and shrink to remove the -1s padding
|
||||||
@ -111,10 +108,7 @@ void Foam::polyMesh::initMesh()
|
|||||||
|
|
||||||
void Foam::polyMesh::initMesh(cellList& c)
|
void Foam::polyMesh::initMesh(cellList& c)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Calculating owner-neighbour arrays" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Calculating owner-neighbour arrays" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
owner_.setSize(faces_.size(), -1);
|
owner_.setSize(faces_.size(), -1);
|
||||||
neighbour_.setSize(faces_.size(), -1);
|
neighbour_.setSize(faces_.size(), -1);
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -40,12 +41,8 @@ Description
|
|||||||
|
|
||||||
void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm)
|
void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
<< "Updating addressing and (optional) pointMesh/pointFields" << endl;
|
||||||
InfoInFunction
|
|
||||||
<< "Updating addressing and (optional) pointMesh/pointFields"
|
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update boundaryMesh (note that patches themselves already ok)
|
// Update boundaryMesh (note that patches themselves already ok)
|
||||||
boundary_.updateMesh();
|
boundary_.updateMesh();
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2018 OpenCFD Ltd.
|
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -493,12 +493,9 @@ Foam::label Foam::ZoneMesh<ZoneType, MeshType>::findZoneID
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Zone not found
|
// Zone not found
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Zone named " << zoneName << " not found. "
|
<< "Zone named " << zoneName << " not found. "
|
||||||
<< "List of available zone names: " << names() << endl;
|
<< "List of available zone names: " << names() << endl;
|
||||||
}
|
|
||||||
|
|
||||||
if (disallowGenericZones != 0)
|
if (disallowGenericZones != 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2018 OpenCFD Ltd.
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -69,10 +69,7 @@ void Foam::faceZone::setFlipMap(const bool val)
|
|||||||
|
|
||||||
void Foam::faceZone::calcFaceZonePatch() const
|
void Foam::faceZone::calcFaceZonePatch() const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Calculating primitive patch" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Calculating primitive patch" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (patchPtr_)
|
if (patchPtr_)
|
||||||
{
|
{
|
||||||
@ -107,19 +104,13 @@ void Foam::faceZone::calcFaceZonePatch() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
DebugInfo << "Finished calculating primitive patch" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Finished calculating primitive patch" << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::faceZone::calcCellLayers() const
|
void Foam::faceZone::calcCellLayers() const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Calculating master cells" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Calculating master cells" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// It is an error to attempt to recalculate edgeCells
|
// It is an error to attempt to recalculate edgeCells
|
||||||
// if the pointer is already set
|
// if the pointer is already set
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017 OpenCFD Ltd.
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -54,10 +54,7 @@ const Foam::Map<Foam::label>& Foam::zone::lookupMap() const
|
|||||||
|
|
||||||
void Foam::zone::calcLookupMap() const
|
void Foam::zone::calcLookupMap() const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Calculating lookup map" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Calculating lookup map" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lookupMapPtr_)
|
if (lookupMapPtr_)
|
||||||
{
|
{
|
||||||
@ -76,10 +73,7 @@ void Foam::zone::calcLookupMap() const
|
|||||||
lm.insert(addr[i], i);
|
lm.insert(addr[i], i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
DebugInfo << "Finished calculating lookup map" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Finished calculating lookup map" << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -52,11 +52,7 @@ bool Foam::primitiveMesh::checkClosedBoundary
|
|||||||
const bitSet& internalOrCoupledFaces
|
const bitSet& internalOrCoupledFaces
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking if boundary is closed" << endl;
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Checking whether the boundary is closed" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Loop through all boundary faces and sum up the face area vectors.
|
// Loop through all boundary faces and sum up the face area vectors.
|
||||||
// For a closed boundary, this should be zero in all vector components
|
// For a closed boundary, this should be zero in all vector components
|
||||||
@ -110,11 +106,7 @@ bool Foam::primitiveMesh::checkClosedCells
|
|||||||
const Vector<label>& meshD
|
const Vector<label>& meshD
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking if cells are closed" << endl;
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Checking whether cells are closed" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check that all cells labels are valid
|
// Check that all cells labels are valid
|
||||||
const cellList& c = cells();
|
const cellList& c = cells();
|
||||||
@ -240,10 +232,7 @@ bool Foam::primitiveMesh::checkFaceAreas
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking face area magnitudes" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking face area magnitudes" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
const scalarField magFaceAreas(mag(faceAreas));
|
const scalarField magFaceAreas(mag(faceAreas));
|
||||||
|
|
||||||
@ -316,10 +305,7 @@ bool Foam::primitiveMesh::checkCellVolumes
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking cell volumes" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking cell volumes" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
scalar minVolume = GREAT;
|
scalar minVolume = GREAT;
|
||||||
scalar maxVolume = -GREAT;
|
scalar maxVolume = -GREAT;
|
||||||
@ -384,11 +370,7 @@ bool Foam::primitiveMesh::checkFaceOrthogonality
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking mesh non-orthogonality" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking mesh non-orthogonality" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
tmp<scalarField> tortho = primitiveMeshTools::faceOrthogonality
|
tmp<scalarField> tortho = primitiveMeshTools::faceOrthogonality
|
||||||
(
|
(
|
||||||
@ -494,10 +476,7 @@ bool Foam::primitiveMesh::checkFacePyramids
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking face orientation" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking face orientation" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
const labelList& own = faceOwner();
|
const labelList& own = faceOwner();
|
||||||
const labelList& nei = faceNeighbour();
|
const labelList& nei = faceNeighbour();
|
||||||
@ -594,10 +573,7 @@ bool Foam::primitiveMesh::checkFaceSkewness
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking face skewness" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking face skewness" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Warn if the skew correction vector is more than skewWarning times
|
// Warn if the skew correction vector is more than skewWarning times
|
||||||
// larger than the face area vector
|
// larger than the face area vector
|
||||||
@ -664,10 +640,7 @@ bool Foam::primitiveMesh::checkFaceAngles
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking face angles" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking face angles" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (maxDeg < -SMALL || maxDeg > 180+SMALL)
|
if (maxDeg < -SMALL || maxDeg > 180+SMALL)
|
||||||
{
|
{
|
||||||
@ -743,15 +716,12 @@ bool Foam::primitiveMesh::checkFaceFlatness
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking face flatness" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking face flatness" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (warnFlatness < 0 || warnFlatness > 1)
|
if (warnFlatness < 0 || warnFlatness > 1)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "warnFlatness should be [0..1] but is now " << warnFlatness
|
<< "warnFlatness should be [0..1] but is " << warnFlatness
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -844,10 +814,7 @@ bool Foam::primitiveMesh::checkConcaveCells
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking for concave cells" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking for concave cells" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
const cellList& c = cells();
|
const cellList& c = cells();
|
||||||
const labelList& fOwner = faceOwner();
|
const labelList& fOwner = faceOwner();
|
||||||
@ -951,10 +918,7 @@ bool Foam::primitiveMesh::checkUpperTriangular
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking face ordering" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking face ordering" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check whether internal faces are ordered in the upper triangular order
|
// Check whether internal faces are ordered in the upper triangular order
|
||||||
const labelList& own = faceOwner();
|
const labelList& own = faceOwner();
|
||||||
@ -1112,10 +1076,7 @@ bool Foam::primitiveMesh::checkCellsZipUp
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking topological cell openness" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking topological cell openness" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
label nOpenCells = 0;
|
label nOpenCells = 0;
|
||||||
|
|
||||||
@ -1208,10 +1169,7 @@ bool Foam::primitiveMesh::checkFaceVertices
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking face vertices" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking face vertices" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check that all vertex labels are valid
|
// Check that all vertex labels are valid
|
||||||
const faceList& f = faces();
|
const faceList& f = faces();
|
||||||
@ -1279,10 +1237,7 @@ bool Foam::primitiveMesh::checkPoints
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking points" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking points" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
label nFaceErrors = 0;
|
label nFaceErrors = 0;
|
||||||
label nCellErrors = 0;
|
label nCellErrors = 0;
|
||||||
@ -1551,10 +1506,7 @@ bool Foam::primitiveMesh::checkFaceFaces
|
|||||||
labelHashSet* setPtr
|
labelHashSet* setPtr
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking face-face connectivity" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking face-face connectivity" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
const labelListList& pf = pointFaces();
|
const labelListList& pf = pointFaces();
|
||||||
|
|
||||||
@ -1872,10 +1824,7 @@ bool Foam::primitiveMesh::checkGeometry(const bool report) const
|
|||||||
|
|
||||||
bool Foam::primitiveMesh::checkMesh(const bool report) const
|
bool Foam::primitiveMesh::checkMesh(const bool report) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Checking primitiveMesh" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Checking primitiveMesh" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
label nFailedChecks = checkTopology(report) + checkGeometry(report);
|
label nFailedChecks = checkTopology(report) + checkGeometry(report);
|
||||||
|
|
||||||
|
|||||||
@ -1229,10 +1229,8 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit() const
|
|||||||
|
|
||||||
if (curPoints.size() < 5)
|
if (curPoints.size() < 5)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInfo
|
||||||
{
|
<< "WARNING: Extending point set for fitting." << endl;
|
||||||
Info << "WARNING: Extending point set for fitting." << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
labelHashSet faceSet(pointFaces[curPoint]);
|
labelHashSet faceSet(pointFaces[curPoint]);
|
||||||
labelList curFaces(faceSet.toc());
|
labelList curFaces(faceSet.toc());
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2016-2017 Wikki Ltd
|
Copyright (C) 2016-2017 Wikki Ltd
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -36,11 +37,7 @@ License
|
|||||||
|
|
||||||
void Foam::faMesh::updateMesh(const mapPolyMesh& mpm)
|
void Foam::faMesh::updateMesh(const mapPolyMesh& mpm)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Updating mesh" << endl;
|
||||||
{
|
|
||||||
Info<< "bool faMesh::updateMesh(const mapPolyMesh& mpm) : "
|
|
||||||
<< "Updating mesh" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// if (!mpm.morphing())
|
// if (!mpm.morphing())
|
||||||
// {
|
// {
|
||||||
@ -182,11 +179,7 @@ void Foam::faMesh::mapOldAreas(const faMeshMapper& mapper) const
|
|||||||
{
|
{
|
||||||
if (S0Ptr_)
|
if (S0Ptr_)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Mapping old face areas." << endl;
|
||||||
{
|
|
||||||
InfoIn("void faMesh::mapOldAreas(const faMeshMapper& mapper)")
|
|
||||||
<< "Mapping old face areas." << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
scalarField& S0 = *S0Ptr_;
|
scalarField& S0 = *S0Ptr_;
|
||||||
|
|
||||||
@ -211,11 +204,7 @@ void Foam::faMesh::mapOldAreas(const faMeshMapper& mapper) const
|
|||||||
|
|
||||||
if (S00Ptr_)
|
if (S00Ptr_)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Mapping old-old face areas." << endl;
|
||||||
{
|
|
||||||
InfoIn("void faMesh::mapOldAreas(const faMeshMapper& mapper)")
|
|
||||||
<< "Mapping old-old face areas." << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
scalarField& S00 = *S00Ptr_;
|
scalarField& S00 = *S00Ptr_;
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -112,12 +112,9 @@ Foam::fv::options& Foam::fv::options::New(const fvMesh& mesh)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Constructing " << typeName
|
<< "Constructing " << typeName
|
||||||
<< " for region " << mesh.name() << endl;
|
<< " for region " << mesh.name() << nl;
|
||||||
}
|
|
||||||
|
|
||||||
options* objectPtr = new options(mesh);
|
options* objectPtr = new options(mesh);
|
||||||
regIOobject::store(objectPtr);
|
regIOobject::store(objectPtr);
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015 OpenFOAM Foundation
|
Copyright (C) 2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -204,12 +204,9 @@ Foam::turbulentDFSEMInletFvPatchVectorField::patchMapper() const
|
|||||||
|
|
||||||
pointField samplePoints((IFstream(samplePointsFile)()));
|
pointField samplePoints((IFstream(samplePointsFile)()));
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< " Read " << samplePoints.size() << " sample points from "
|
<< " Read " << samplePoints.size() << " sample points from "
|
||||||
<< samplePointsFile << endl;
|
<< samplePointsFile << endl;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// tbd: run-time selection
|
// tbd: run-time selection
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -37,13 +37,9 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New
|
|||||||
const DimensionedField<Type, volMesh>& iF
|
const DimensionedField<Type, volMesh>& iF
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "patchFieldType = " << patchFieldType
|
<< "patchFieldType = " << patchFieldType
|
||||||
<< " : " << p.type()
|
<< " : " << p.type() << nl;
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto cstrIter = patchConstructorTablePtr_->cfind(patchFieldType);
|
auto cstrIter = patchConstructorTablePtr_->cfind(patchFieldType);
|
||||||
|
|
||||||
@ -109,12 +105,8 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New
|
|||||||
{
|
{
|
||||||
const word patchFieldType(dict.get<word>("type"));
|
const word patchFieldType(dict.get<word>("type"));
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
<< "patchFieldType = " << patchFieldType << nl;
|
||||||
InfoInFunction
|
|
||||||
<< "patchFieldType = " << patchFieldType
|
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchFieldType);
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchFieldType);
|
||||||
|
|
||||||
@ -168,10 +160,8 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New
|
|||||||
const fvPatchFieldMapper& pfMapper
|
const fvPatchFieldMapper& pfMapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
<< "Constructing fvPatchField<Type>" << nl;
|
||||||
InfoInFunction << "Constructing fvPatchField<Type>" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto cstrIter = patchMapperConstructorTablePtr_->cfind(ptf.type());
|
auto cstrIter = patchMapperConstructorTablePtr_->cfind(ptf.type());
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -54,10 +55,7 @@ Foam::fv::LeastSquaresVectors<Stencil>::~LeastSquaresVectors()
|
|||||||
template<class Stencil>
|
template<class Stencil>
|
||||||
void Foam::fv::LeastSquaresVectors<Stencil>::calcLeastSquaresVectors()
|
void Foam::fv::LeastSquaresVectors<Stencil>::calcLeastSquaresVectors()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Calculating least square gradient vectors" << nl;
|
||||||
{
|
|
||||||
InfoInFunction << "Calculating least square gradient vectors" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
const fvMesh& mesh = this->mesh_;
|
const fvMesh& mesh = this->mesh_;
|
||||||
const extendedCentredCellToCellStencil& stencil = this->stencil();
|
const extendedCentredCellToCellStencil& stencil = this->stencil();
|
||||||
@ -98,11 +96,8 @@ void Foam::fv::LeastSquaresVectors<Stencil>::calcLeastSquaresVectors()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
DebugInfo
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Finished calculating least square gradient vectors" << endl;
|
<< "Finished calculating least square gradient vectors" << endl;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -84,10 +85,7 @@ Foam::leastSquaresVectors::~leastSquaresVectors()
|
|||||||
|
|
||||||
void Foam::leastSquaresVectors::calcLeastSquaresVectors()
|
void Foam::leastSquaresVectors::calcLeastSquaresVectors()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Calculating least square gradient vectors" << nl;
|
||||||
{
|
|
||||||
InfoInFunction << "Calculating least square gradient vectors" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
const fvMesh& mesh = mesh_;
|
const fvMesh& mesh = mesh_;
|
||||||
|
|
||||||
@ -168,11 +166,7 @@ void Foam::leastSquaresVectors::calcLeastSquaresVectors()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
DebugInfo << "Finished calculating least square gradient vectors" << endl;
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<<"Finished calculating least square gradient vectors" << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -84,10 +85,7 @@ Foam::leastSquaresVectors::~leastSquaresVectors()
|
|||||||
|
|
||||||
void Foam::leastSquaresVectors::calcLeastSquaresVectors()
|
void Foam::leastSquaresVectors::calcLeastSquaresVectors()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Calculating least square gradient vectors" << nl;
|
||||||
{
|
|
||||||
InfoInFunction << "Calculating least square gradient vectors" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
const fvMesh& mesh = mesh_;
|
const fvMesh& mesh = mesh_;
|
||||||
|
|
||||||
@ -207,11 +205,7 @@ void Foam::leastSquaresVectors::calcLeastSquaresVectors()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
DebugInfo << "Finished calculating least square gradient vectors" << nl;
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Finished calculating least square gradient vectors" << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -84,10 +85,7 @@ Foam::leastSquaresVectors::~leastSquaresVectors()
|
|||||||
|
|
||||||
void Foam::leastSquaresVectors::calcLeastSquaresVectors()
|
void Foam::leastSquaresVectors::calcLeastSquaresVectors()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Calculating least square gradient vectors" << nl;
|
||||||
{
|
|
||||||
InfoInFunction << "Calculating least square gradient vectors" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
const fvMesh& mesh = mesh_;
|
const fvMesh& mesh = mesh_;
|
||||||
|
|
||||||
@ -164,11 +162,8 @@ void Foam::leastSquaresVectors::calcLeastSquaresVectors()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
DebugInfo
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Finished calculating least square gradient vectors" << endl;
|
<< "Finished calculating least square gradient vectors" << endl;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -52,18 +53,12 @@ Foam::CentredFitSnGradData<Polynomial>::CentredFitSnGradData
|
|||||||
),
|
),
|
||||||
coeffs_(mesh.nFaces())
|
coeffs_(mesh.nFaces())
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
<< "Contructing CentredFitSnGradData<Polynomial>" << nl;
|
||||||
InfoInFunction
|
|
||||||
<< "Contructing CentredFitSnGradData<Polynomial>" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
calcFit();
|
calcFit();
|
||||||
|
|
||||||
if (debug)
|
DebugInfo << " Finished constructing polynomialFit data" << endl;
|
||||||
{
|
|
||||||
Info<< " Finished constructing polynomialFit data" << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -282,11 +282,8 @@ Foam::fvMatrix<Type>::fvMatrix
|
|||||||
boundaryCoeffs_(psi.mesh().boundary().size()),
|
boundaryCoeffs_(psi.mesh().boundary().size()),
|
||||||
faceFluxCorrectionPtr_(nullptr)
|
faceFluxCorrectionPtr_(nullptr)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Constructing fvMatrix<Type> for field " << psi_.name() << endl;
|
<< "Constructing fvMatrix<Type> for field " << psi_.name() << endl;
|
||||||
}
|
|
||||||
|
|
||||||
// Initialise coupling coefficients
|
// Initialise coupling coefficients
|
||||||
forAll(psi.mesh().boundary(), patchi)
|
forAll(psi.mesh().boundary(), patchi)
|
||||||
@ -334,11 +331,8 @@ Foam::fvMatrix<Type>::fvMatrix(const fvMatrix<Type>& fvm)
|
|||||||
boundaryCoeffs_(fvm.boundaryCoeffs_),
|
boundaryCoeffs_(fvm.boundaryCoeffs_),
|
||||||
faceFluxCorrectionPtr_(nullptr)
|
faceFluxCorrectionPtr_(nullptr)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Copying fvMatrix<Type> for field " << psi_.name() << endl;
|
<< "Copying fvMatrix<Type> for field " << psi_.name() << endl;
|
||||||
}
|
|
||||||
|
|
||||||
if (fvm.faceFluxCorrectionPtr_)
|
if (fvm.faceFluxCorrectionPtr_)
|
||||||
{
|
{
|
||||||
@ -378,11 +372,8 @@ Foam::fvMatrix<Type>::fvMatrix(const tmp<fvMatrix<Type>>& tfvm)
|
|||||||
),
|
),
|
||||||
faceFluxCorrectionPtr_(nullptr)
|
faceFluxCorrectionPtr_(nullptr)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Copying fvMatrix<Type> for field " << psi_.name() << endl;
|
<< "Copying fvMatrix<Type> for field " << psi_.name() << endl;
|
||||||
}
|
|
||||||
|
|
||||||
if (tfvm().faceFluxCorrectionPtr_)
|
if (tfvm().faceFluxCorrectionPtr_)
|
||||||
{
|
{
|
||||||
@ -420,11 +411,8 @@ Foam::fvMatrix<Type>::fvMatrix
|
|||||||
boundaryCoeffs_(psi.mesh().boundary().size()),
|
boundaryCoeffs_(psi.mesh().boundary().size()),
|
||||||
faceFluxCorrectionPtr_(nullptr)
|
faceFluxCorrectionPtr_(nullptr)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Constructing fvMatrix<Type> for field " << psi_.name() << endl;
|
<< "Constructing fvMatrix<Type> for field " << psi_.name() << endl;
|
||||||
}
|
|
||||||
|
|
||||||
// Initialise coupling coefficients
|
// Initialise coupling coefficients
|
||||||
forAll(psi.mesh().boundary(), patchi)
|
forAll(psi.mesh().boundary(), patchi)
|
||||||
@ -468,11 +456,8 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fvMatrix<Type>::clone() const
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::fvMatrix<Type>::~fvMatrix()
|
Foam::fvMatrix<Type>::~fvMatrix()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Destroying fvMatrix<Type> for field " << psi_.name() << endl;
|
<< "Destroying fvMatrix<Type> for field " << psi_.name() << endl;
|
||||||
}
|
|
||||||
|
|
||||||
if (faceFluxCorrectionPtr_)
|
if (faceFluxCorrectionPtr_)
|
||||||
{
|
{
|
||||||
@ -579,11 +564,8 @@ void Foam::fvMatrix<Type>::relax(const scalar alpha)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Relaxing " << psi_.name() << " by " << alpha << endl;
|
<< "Relaxing " << psi_.name() << " by " << alpha << endl;
|
||||||
}
|
|
||||||
|
|
||||||
Field<Type>& S = source();
|
Field<Type>& S = source();
|
||||||
scalarField& D = diag();
|
scalarField& D = diag();
|
||||||
|
|||||||
@ -127,10 +127,7 @@ void Foam::fvMesh::clearGeom()
|
|||||||
|
|
||||||
void Foam::fvMesh::clearAddressing(const bool isMeshUpdate)
|
void Foam::fvMesh::clearAddressing(const bool isMeshUpdate)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "isMeshUpdate: " << isMeshUpdate << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "isMeshUpdate: " << isMeshUpdate << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isMeshUpdate)
|
if (isMeshUpdate)
|
||||||
{
|
{
|
||||||
@ -168,15 +165,10 @@ void Foam::fvMesh::storeOldVol(const scalarField& V)
|
|||||||
{
|
{
|
||||||
if (curTimeIndex_ < time().timeIndex())
|
if (curTimeIndex_ < time().timeIndex())
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< " Storing old time volumes since from time " << curTimeIndex_
|
<< " Storing old time volumes since from time " << curTimeIndex_
|
||||||
<< " and time now " << time().timeIndex()
|
<< " and time now " << time().timeIndex()
|
||||||
<< " V:" << V.size()
|
<< " V:" << V.size() << endl;
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (V00Ptr_ && V0Ptr_)
|
if (V00Ptr_ && V0Ptr_)
|
||||||
{
|
{
|
||||||
@ -220,6 +212,7 @@ void Foam::fvMesh::storeOldVol(const scalarField& V)
|
|||||||
InfoInFunction
|
InfoInFunction
|
||||||
<< " Stored old time volumes V0:" << V0Ptr_->size()
|
<< " Stored old time volumes V0:" << V0Ptr_->size()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
if (V00Ptr_)
|
if (V00Ptr_)
|
||||||
{
|
{
|
||||||
InfoInFunction
|
InfoInFunction
|
||||||
@ -266,10 +259,7 @@ Foam::fvMesh::fvMesh(const IOobject& io)
|
|||||||
CfPtr_(nullptr),
|
CfPtr_(nullptr),
|
||||||
phiPtr_(nullptr)
|
phiPtr_(nullptr)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Constructing fvMesh from IOobject" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Constructing fvMesh from IOobject" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check the existence of the cell volumes and read if present
|
// Check the existence of the cell volumes and read if present
|
||||||
// and set the storage of V00
|
// and set the storage of V00
|
||||||
@ -370,10 +360,7 @@ Foam::fvMesh::fvMesh
|
|||||||
CfPtr_(nullptr),
|
CfPtr_(nullptr),
|
||||||
phiPtr_(nullptr)
|
phiPtr_(nullptr)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Constructing fvMesh from components" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Constructing fvMesh from components" << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -410,10 +397,7 @@ Foam::fvMesh::fvMesh
|
|||||||
CfPtr_(nullptr),
|
CfPtr_(nullptr),
|
||||||
phiPtr_(nullptr)
|
phiPtr_(nullptr)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Constructing fvMesh from components" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Constructing fvMesh from components" << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -521,10 +505,7 @@ void Foam::fvMesh::addFvPatches
|
|||||||
|
|
||||||
void Foam::fvMesh::removeFvBoundary()
|
void Foam::fvMesh::removeFvBoundary()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Removing boundary patches." << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Removing boundary patches." << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove fvBoundaryMesh data first.
|
// Remove fvBoundaryMesh data first.
|
||||||
boundary_.clear();
|
boundary_.clear();
|
||||||
@ -537,19 +518,13 @@ void Foam::fvMesh::removeFvBoundary()
|
|||||||
|
|
||||||
Foam::polyMesh::readUpdateState Foam::fvMesh::readUpdate()
|
Foam::polyMesh::readUpdateState Foam::fvMesh::readUpdate()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Updating fvMesh. ";
|
||||||
{
|
|
||||||
InfoInFunction << "Updating fvMesh. ";
|
|
||||||
}
|
|
||||||
|
|
||||||
polyMesh::readUpdateState state = polyMesh::readUpdate();
|
polyMesh::readUpdateState state = polyMesh::readUpdate();
|
||||||
|
|
||||||
if (state == polyMesh::TOPO_PATCH_CHANGE)
|
if (state == polyMesh::TOPO_PATCH_CHANGE)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInfo << "Boundary and topological update" << endl;
|
||||||
{
|
|
||||||
Info<< "Boundary and topological update" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
boundary_.readUpdate(boundaryMesh());
|
boundary_.readUpdate(boundaryMesh());
|
||||||
|
|
||||||
@ -558,28 +533,19 @@ Foam::polyMesh::readUpdateState Foam::fvMesh::readUpdate()
|
|||||||
}
|
}
|
||||||
else if (state == polyMesh::TOPO_CHANGE)
|
else if (state == polyMesh::TOPO_CHANGE)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInfo << "Topological update" << endl;
|
||||||
{
|
|
||||||
Info<< "Topological update" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
clearOut();
|
clearOut();
|
||||||
}
|
}
|
||||||
else if (state == polyMesh::POINTS_MOVED)
|
else if (state == polyMesh::POINTS_MOVED)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInfo << "Point motion update" << endl;
|
||||||
{
|
|
||||||
Info<< "Point motion update" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
clearGeom();
|
clearGeom();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInfo << "No update" << endl;
|
||||||
{
|
|
||||||
Info<< "No update" << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return state;
|
return state;
|
||||||
@ -596,12 +562,9 @@ const Foam::lduAddressing& Foam::fvMesh::lduAddr() const
|
|||||||
{
|
{
|
||||||
if (!lduPtr_)
|
if (!lduPtr_)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
<< "Calculating fvMeshLduAddressing from nFaces:"
|
||||||
InfoInFunction
|
|
||||||
<< " calculating fvMeshLduAddressing from nFaces:"
|
|
||||||
<< nFaces() << endl;
|
<< nFaces() << endl;
|
||||||
}
|
|
||||||
|
|
||||||
lduPtr_ = new fvMeshLduAddressing(*this);
|
lduPtr_ = new fvMeshLduAddressing(*this);
|
||||||
}
|
}
|
||||||
@ -612,16 +575,12 @@ const Foam::lduAddressing& Foam::fvMesh::lduAddr() const
|
|||||||
|
|
||||||
void Foam::fvMesh::mapFields(const mapPolyMesh& meshMap)
|
void Foam::fvMesh::mapFields(const mapPolyMesh& meshMap)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< " nOldCells:" << meshMap.nOldCells()
|
<< " nOldCells:" << meshMap.nOldCells()
|
||||||
<< " nCells:" << nCells()
|
<< " nCells:" << nCells()
|
||||||
<< " nOldFaces:" << meshMap.nOldFaces()
|
<< " nOldFaces:" << meshMap.nOldFaces()
|
||||||
<< " nFaces:" << nFaces()
|
<< " nFaces:" << nFaces()
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// We require geometric properties valid for the old mesh
|
// We require geometric properties valid for the old mesh
|
||||||
if
|
if
|
||||||
@ -717,12 +676,10 @@ void Foam::fvMesh::mapFields(const mapPolyMesh& meshMap)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
DebugInfo
|
||||||
{
|
<< "Mapping old time volume V0. Merged "
|
||||||
Info<< "Mapping old time volume V0. Merged "
|
|
||||||
<< nMerged << " out of " << nCells() << " cells" << endl;
|
<< nMerged << " out of " << nCells() << " cells" << endl;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Map the old-old volume. Just map to new cell labels.
|
// Map the old-old volume. Just map to new cell labels.
|
||||||
@ -760,12 +717,10 @@ void Foam::fvMesh::mapFields(const mapPolyMesh& meshMap)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
DebugInfo
|
||||||
{
|
<< "Mapping old time volume V00. Merged "
|
||||||
Info<< "Mapping old time volume V00. Merged "
|
|
||||||
<< nMerged << " out of " << nCells() << " cells" << endl;
|
<< nMerged << " out of " << nCells() << " cells" << endl;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -39,10 +40,7 @@ License
|
|||||||
|
|
||||||
void Foam::fvMesh::makeSf() const
|
void Foam::fvMesh::makeSf() const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Assembling face areas" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Assembling face areas" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// It is an error to attempt to recalculate
|
// It is an error to attempt to recalculate
|
||||||
// if the pointer is already set
|
// if the pointer is already set
|
||||||
@ -76,10 +74,7 @@ void Foam::fvMesh::makeSf() const
|
|||||||
|
|
||||||
void Foam::fvMesh::makeMagSf() const
|
void Foam::fvMesh::makeMagSf() const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Assembling mag face areas" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Assembling mag face areas" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// It is an error to attempt to recalculate
|
// It is an error to attempt to recalculate
|
||||||
// if the pointer is already set
|
// if the pointer is already set
|
||||||
@ -112,10 +107,7 @@ void Foam::fvMesh::makeMagSf() const
|
|||||||
|
|
||||||
void Foam::fvMesh::makeC() const
|
void Foam::fvMesh::makeC() const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Assembling cell centres" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Assembling cell centres" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// It is an error to attempt to recalculate
|
// It is an error to attempt to recalculate
|
||||||
// if the pointer is already set
|
// if the pointer is already set
|
||||||
@ -152,10 +144,7 @@ void Foam::fvMesh::makeC() const
|
|||||||
|
|
||||||
void Foam::fvMesh::makeCf() const
|
void Foam::fvMesh::makeCf() const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Assembling face centres" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Assembling face centres" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// It is an error to attempt to recalculate
|
// It is an error to attempt to recalculate
|
||||||
// if the pointer is already set
|
// if the pointer is already set
|
||||||
@ -191,11 +180,8 @@ const Foam::volScalarField::Internal& Foam::fvMesh::V() const
|
|||||||
{
|
{
|
||||||
if (!VPtr_)
|
if (!VPtr_)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Constructing from primitiveMesh::cellVolumes()" << endl;
|
<< "Constructing from primitiveMesh::cellVolumes()" << endl;
|
||||||
}
|
|
||||||
|
|
||||||
VPtr_ = new slicedVolScalarField::Internal
|
VPtr_ = new slicedVolScalarField::Internal
|
||||||
(
|
(
|
||||||
@ -248,10 +234,7 @@ const Foam::volScalarField::Internal& Foam::fvMesh::V00() const
|
|||||||
{
|
{
|
||||||
if (!V00Ptr_)
|
if (!V00Ptr_)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Constructing from V0" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Constructing from V0" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
V00Ptr_ = new DimensionedField<scalar, volMesh>
|
V00Ptr_ = new DimensionedField<scalar, volMesh>
|
||||||
(
|
(
|
||||||
@ -379,10 +362,7 @@ const Foam::surfaceVectorField& Foam::fvMesh::Cf() const
|
|||||||
|
|
||||||
Foam::tmp<Foam::surfaceVectorField> Foam::fvMesh::delta() const
|
Foam::tmp<Foam::surfaceVectorField> Foam::fvMesh::delta() const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Calculating face deltas" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Calculating face deltas" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
tmp<surfaceVectorField> tdelta
|
tmp<surfaceVectorField> tdelta
|
||||||
(
|
(
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -54,17 +55,11 @@ Foam::CentredFitData<Polynomial>::CentredFitData
|
|||||||
),
|
),
|
||||||
coeffs_(mesh.nFaces())
|
coeffs_(mesh.nFaces())
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Contructing CentredFitData<Polynomial>" << nl;
|
||||||
{
|
|
||||||
InfoInFunction << "Contructing CentredFitData<Polynomial>" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
calcFit();
|
calcFit();
|
||||||
|
|
||||||
if (debug)
|
DebugInfo << "Finished constructing polynomialFit data" << endl;
|
||||||
{
|
|
||||||
Info<< "Finished constructing polynomialFit data" << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -55,17 +56,11 @@ Foam::UpwindFitData<Polynomial>::UpwindFitData
|
|||||||
owncoeffs_(mesh.nFaces()),
|
owncoeffs_(mesh.nFaces()),
|
||||||
neicoeffs_(mesh.nFaces())
|
neicoeffs_(mesh.nFaces())
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Contructing UpwindFitData<Polynomial>" << nl;
|
||||||
{
|
|
||||||
InfoInFunction << "Contructing UpwindFitData<Polynomial>" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
calcFit();
|
calcFit();
|
||||||
|
|
||||||
if (debug)
|
DebugInfo << " Finished constructing polynomialFit data" << nl;
|
||||||
{
|
|
||||||
Info<< " Finished constructing polynomialFit data" << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -67,10 +68,7 @@ Foam::skewCorrectionVectors::~skewCorrectionVectors()
|
|||||||
|
|
||||||
void Foam::skewCorrectionVectors::calcSkewCorrectionVectors()
|
void Foam::skewCorrectionVectors::calcSkewCorrectionVectors()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Calculating skew correction vectors" << nl;
|
||||||
{
|
|
||||||
InfoInFunction << "Calculating skew correction vectors" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set local references to mesh data
|
// Set local references to mesh data
|
||||||
const volVectorField& C = mesh_.C();
|
const volVectorField& C = mesh_.C();
|
||||||
@ -134,10 +132,7 @@ void Foam::skewCorrectionVectors::calcSkewCorrectionVectors()
|
|||||||
max(mag(skewCorrectionVectors_)*mesh_.deltaCoeffs()).value();
|
max(mag(skewCorrectionVectors_)*mesh_.deltaCoeffs()).value();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction << "skew coefficient = " << skewCoeff << nl;
|
||||||
{
|
|
||||||
InfoInFunction << "skew coefficient = " << skewCoeff << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (skewCoeff < 1e-5)
|
if (skewCoeff < 1e-5)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -98,8 +98,7 @@ Foam::surfaceInterpolationScheme<Type>::New
|
|||||||
|
|
||||||
if (surfaceInterpolation::debug || surfaceInterpolationScheme<Type>::debug)
|
if (surfaceInterpolation::debug || surfaceInterpolationScheme<Type>::debug)
|
||||||
{
|
{
|
||||||
InfoInFunction
|
InfoInFunction << "Discretisation scheme = " << schemeName << endl;
|
||||||
<< "Discretisation scheme = " << schemeName << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto cstrIter = MeshFluxConstructorTablePtr_->cfind(schemeName);
|
auto cstrIter = MeshFluxConstructorTablePtr_->cfind(schemeName);
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -61,22 +62,16 @@ Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcDistribution
|
|||||||
if (nHaveFaces > 1)
|
if (nHaveFaces > 1)
|
||||||
{
|
{
|
||||||
proci = -1;
|
proci = -1;
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "AMI split across multiple processors" << endl;
|
<< "AMI split across multiple processors" << endl;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (nHaveFaces == 1)
|
else if (nHaveFaces == 1)
|
||||||
{
|
{
|
||||||
proci = facesPresentOnProc.find(1);
|
proci = facesPresentOnProc.find(1);
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "AMI local to processor" << proci << endl;
|
<< "AMI local to processor" << proci << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Either not parallel or no faces on any processor
|
// Either not parallel or no faces on any processor
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015-2018 OpenCFD Ltd.
|
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -371,15 +371,12 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
|
|||||||
// 'reverseTransformPosition' functionality.
|
// 'reverseTransformPosition' functionality.
|
||||||
scalar srcSumDiff = 0;
|
scalar srcSumDiff = 0;
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "patch:" << name()
|
<< "patch:" << name()
|
||||||
<< " srcSum:" << srcSum
|
<< " srcSum:" << srcSum
|
||||||
<< " tgtSum:" << tgtSum
|
<< " tgtSum:" << tgtSum
|
||||||
<< " direction:" << direction
|
<< " direction:" << direction
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
|
||||||
|
|
||||||
// Loop, replicating the geometry
|
// Loop, replicating the geometry
|
||||||
while
|
while
|
||||||
@ -395,24 +392,18 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
|
|||||||
{
|
{
|
||||||
periodicPatch.transformPosition(thisPoints);
|
periodicPatch.transformPosition(thisPoints);
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "patch:" << name()
|
<< "patch:" << name()
|
||||||
<< " moving this side from:"
|
<< " moving this side from:"
|
||||||
<< gAverage(thisPatch.points())
|
<< gAverage(thisPatch.points())
|
||||||
<< " to:" << gAverage(thisPoints) << endl;
|
<< " to:" << gAverage(thisPoints) << endl;
|
||||||
}
|
|
||||||
|
|
||||||
thisPatch.movePoints(thisPoints);
|
thisPatch.movePoints(thisPoints);
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "patch:" << name()
|
<< "patch:" << name()
|
||||||
<< " appending weights with untransformed slave side"
|
<< " appending weights with untransformed slave side"
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
|
||||||
|
|
||||||
AMIPtr_->append(thisPatch, nbrPatch0);
|
AMIPtr_->append(thisPatch, nbrPatch0);
|
||||||
|
|
||||||
@ -425,14 +416,11 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
|
|||||||
{
|
{
|
||||||
periodicPatch.transformPosition(nbrPoints);
|
periodicPatch.transformPosition(nbrPoints);
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "patch:" << name()
|
<< "patch:" << name()
|
||||||
<< " moving neighbour side from:"
|
<< " moving neighbour side from:"
|
||||||
<< gAverage(nbrPatch.points())
|
<< gAverage(nbrPatch.points())
|
||||||
<< " to:" << gAverage(nbrPoints) << endl;
|
<< " to:" << gAverage(nbrPoints) << endl;
|
||||||
}
|
|
||||||
|
|
||||||
nbrPatch.movePoints(nbrPoints);
|
nbrPatch.movePoints(nbrPoints);
|
||||||
|
|
||||||
@ -461,9 +449,7 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
|
|||||||
|
|
||||||
++iter;
|
++iter;
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "patch:" << name()
|
<< "patch:" << name()
|
||||||
<< " iteration:" << iter
|
<< " iteration:" << iter
|
||||||
<< " srcSum:" << srcSum
|
<< " srcSum:" << srcSum
|
||||||
@ -471,7 +457,6 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
|
|||||||
<< " direction:" << direction
|
<< " direction:" << direction
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Close debug streams
|
// Close debug streams
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2013 OpenFOAM Foundation
|
Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
Copyright (C) 2018 OpenCFD Ltd.
|
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -365,10 +365,7 @@ Foam::label Foam::regionSplit::calcLocalRegionSplit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
DebugInfo << "regionSplit = " << double(timing.elapsed()) << "s\n";
|
||||||
{
|
|
||||||
Info<<"regionSplit = " << double(timing.elapsed()) << "s\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
return nLocalRegions;
|
return nLocalRegions;
|
||||||
}
|
}
|
||||||
@ -817,11 +814,8 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::reduceRegions
|
|||||||
cellRegion[celli] = localToGlobal[cellRegion[celli]];
|
cellRegion[celli] = localToGlobal[cellRegion[celli]];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
DebugInfo
|
||||||
{
|
<<"regionSplit::reduceRegions = " << double(timing.elapsed()) << "s\n";
|
||||||
Info<<"regionSplit::reduceRegions = "
|
|
||||||
<< double(timing.elapsed()) << "s\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
return globalCompactPtr;
|
return globalCompactPtr;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -230,14 +231,10 @@ Foam::searchablePlate::searchablePlate
|
|||||||
span_(span),
|
span_(span),
|
||||||
normalDir_(calcNormal(span_))
|
normalDir_(calcNormal(span_))
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< " origin:" << origin_
|
<< " origin:" << origin_
|
||||||
<< " origin+span:" << origin_+span_
|
<< " origin+span:" << origin_+span_
|
||||||
<< " normal:" << vector::componentNames[normalDir_]
|
<< " normal:" << vector::componentNames[normalDir_] << nl;
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
bounds() = boundBox(origin_, origin_ + span_);
|
bounds() = boundBox(origin_, origin_ + span_);
|
||||||
}
|
}
|
||||||
@ -254,14 +251,10 @@ Foam::searchablePlate::searchablePlate
|
|||||||
span_(dict.get<vector>("span")),
|
span_(dict.get<vector>("span")),
|
||||||
normalDir_(calcNormal(span_))
|
normalDir_(calcNormal(span_))
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< " origin:" << origin_
|
<< " origin:" << origin_
|
||||||
<< " origin+span:" << origin_+span_
|
<< " origin+span:" << origin_+span_
|
||||||
<< " normal:" << vector::componentNames[normalDir_]
|
<< " normal:" << vector::componentNames[normalDir_] << nl;
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
bounds() = boundBox(origin_, origin_ + span_);
|
bounds() = boundBox(origin_, origin_ + span_);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -122,13 +122,10 @@ Foam::pointToPointPlanarInterpolation::calcCoordinateSystem
|
|||||||
|
|
||||||
const vector n = normalised(e1 ^ (points[index2]-p0));
|
const vector n = normalised(e1 ^ (points[index2]-p0));
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< " Used points " << p0 << ' ' << points[index1]
|
<< " Used points " << p0 << ' ' << points[index1]
|
||||||
<< ' ' << points[index2]
|
<< ' ' << points[index2]
|
||||||
<< " to define coordinate system with normal " << n << endl;
|
<< " to define coordinate system with normal " << n << endl;
|
||||||
}
|
|
||||||
|
|
||||||
return coordSystem::cartesian
|
return coordSystem::cartesian
|
||||||
(
|
(
|
||||||
@ -210,14 +207,11 @@ void Foam::pointToPointPlanarInterpolation::calcWeights
|
|||||||
const boundBox bb(localVertices, true);
|
const boundBox bb(localVertices, true);
|
||||||
const point bbMid(bb.centre());
|
const point bbMid(bb.centre());
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< " Perturbing points with " << perturb_
|
<< " Perturbing points with " << perturb_
|
||||||
<< " fraction of a random position inside " << bb
|
<< " fraction of a random position inside " << bb
|
||||||
<< " to break any ties on regular meshes."
|
<< " to break any ties on regular meshes." << nl
|
||||||
<< nl << endl;
|
<< endl;
|
||||||
}
|
|
||||||
|
|
||||||
Random rndGen(123456);
|
Random rndGen(123456);
|
||||||
forAll(localVertices, i)
|
forAll(localVertices, i)
|
||||||
|
|||||||
@ -2545,11 +2545,9 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh(const IOobject& io)
|
|||||||
&& (distType_ == INDEPENDENT || distType_ == DISTRIBUTED)
|
&& (distType_ == INDEPENDENT || distType_ == DISTRIBUTED)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
<< "Read distributedTriSurface " << io.name()
|
||||||
InfoInFunction << "Read distributedTriSurface " << io.name()
|
|
||||||
<< " from parent path " << actualFile << endl;
|
<< " from parent path " << actualFile << endl;
|
||||||
}
|
|
||||||
|
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
@ -2571,7 +2569,8 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh(const IOobject& io)
|
|||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
InfoInFunction << "Read distributedTriSurface " << io.name()
|
InfoInFunction
|
||||||
|
<< "Read distributedTriSurface " << io.name()
|
||||||
<< " from actual path " << actualFile << ':' << endl;
|
<< " from actual path " << actualFile << ':' << endl;
|
||||||
|
|
||||||
labelList nTris(Pstream::nProcs());
|
labelList nTris(Pstream::nProcs());
|
||||||
@ -2590,8 +2589,8 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh(const IOobject& io)
|
|||||||
}
|
}
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
InfoInFunction << "Read distributedTriSurface " << io.name() << ':'
|
InfoInFunction
|
||||||
<< endl;
|
<< "Read distributedTriSurface " << io.name() << ':' << endl;
|
||||||
writeStats(Info);
|
writeStats(Info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2685,12 +2684,10 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh
|
|||||||
&& (distType_ == INDEPENDENT || distType_ == DISTRIBUTED)
|
&& (distType_ == INDEPENDENT || distType_ == DISTRIBUTED)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
<< "Read distributedTriSurface " << io.name()
|
||||||
InfoInFunction << "Read distributedTriSurface " << io.name()
|
|
||||||
<< " from parent path " << actualFile
|
<< " from parent path " << actualFile
|
||||||
<< " and dictionary" << endl;
|
<< " and dictionary" << endl;
|
||||||
}
|
|
||||||
|
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
@ -2712,7 +2709,8 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh
|
|||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
InfoInFunction << "Read distributedTriSurface " << io.name()
|
InfoInFunction
|
||||||
|
<< "Read distributedTriSurface " << io.name()
|
||||||
<< " from actual path " << actualFile
|
<< " from actual path " << actualFile
|
||||||
<< " and dictionary:" << endl;
|
<< " and dictionary:" << endl;
|
||||||
|
|
||||||
@ -2732,8 +2730,8 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh
|
|||||||
}
|
}
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
InfoInFunction << "Read distributedTriSurface " << io.name() << ':'
|
InfoInFunction
|
||||||
<< endl;
|
<< "Read distributedTriSurface " << io.name() << ':' << endl;
|
||||||
writeStats(Info);
|
writeStats(Info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -227,10 +227,7 @@ void reactingOneDim::updateMesh(const scalarField& deltaV)
|
|||||||
|
|
||||||
void reactingOneDim::solveContinuity()
|
void reactingOneDim::solveContinuity()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!moveMesh_)
|
if (!moveMesh_)
|
||||||
{
|
{
|
||||||
@ -255,10 +252,7 @@ void reactingOneDim::solveContinuity()
|
|||||||
|
|
||||||
void reactingOneDim::solveSpeciesMass()
|
void reactingOneDim::solveSpeciesMass()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
volScalarField Yt(0.0*Ys_[0]);
|
volScalarField Yt(0.0*Ys_[0]);
|
||||||
|
|
||||||
@ -294,10 +288,7 @@ void reactingOneDim::solveSpeciesMass()
|
|||||||
|
|
||||||
void reactingOneDim::solveEnergy()
|
void reactingOneDim::solveEnergy()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
tmp<volScalarField> alpha(solidThermo_->alpha());
|
tmp<volScalarField> alpha(solidThermo_->alpha());
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -83,10 +83,7 @@ void kinematicSingleLayer::correctThermoFields()
|
|||||||
|
|
||||||
void kinematicSingleLayer::resetPrimaryRegionSourceTerms()
|
void kinematicSingleLayer::resetPrimaryRegionSourceTerms()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
rhoSpPrimary_ == dimensionedScalar(rhoSp_.dimensions(), Zero);
|
rhoSpPrimary_ == dimensionedScalar(rhoSp_.dimensions(), Zero);
|
||||||
USpPrimary_ == dimensionedVector(USp_.dimensions(), Zero);
|
USpPrimary_ == dimensionedVector(USp_.dimensions(), Zero);
|
||||||
@ -109,10 +106,7 @@ void kinematicSingleLayer::transferPrimaryRegionThermoFields()
|
|||||||
|
|
||||||
void kinematicSingleLayer::transferPrimaryRegionSourceFields()
|
void kinematicSingleLayer::transferPrimaryRegionSourceFields()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
volScalarField::Boundary& rhoSpPrimaryBf =
|
volScalarField::Boundary& rhoSpPrimaryBf =
|
||||||
rhoSpPrimary_.boundaryFieldRef();
|
rhoSpPrimary_.boundaryFieldRef();
|
||||||
@ -215,10 +209,7 @@ void kinematicSingleLayer::correctAlpha()
|
|||||||
|
|
||||||
void kinematicSingleLayer::updateSubmodels()
|
void kinematicSingleLayer::updateSubmodels()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update injection model - mass returned is mass available for injection
|
// Update injection model - mass returned is mass available for injection
|
||||||
injection_.correct(availableMass_, cloudMassTrans_, cloudDiameterTrans_);
|
injection_.correct(availableMass_, cloudMassTrans_, cloudDiameterTrans_);
|
||||||
@ -269,10 +260,7 @@ void kinematicSingleLayer::continuityCheck()
|
|||||||
|
|
||||||
void kinematicSingleLayer::solveContinuity()
|
void kinematicSingleLayer::solveContinuity()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
solve
|
solve
|
||||||
(
|
(
|
||||||
@ -307,10 +295,7 @@ tmp<Foam::fvVectorMatrix> kinematicSingleLayer::solveMomentum
|
|||||||
const volScalarField& pp
|
const volScalarField& pp
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Momentum
|
// Momentum
|
||||||
tmp<fvVectorMatrix> tUEqn
|
tmp<fvVectorMatrix> tUEqn
|
||||||
@ -366,10 +351,7 @@ void kinematicSingleLayer::solveThickness
|
|||||||
const fvVectorMatrix& UEqn
|
const fvVectorMatrix& UEqn
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
volScalarField rUA(1.0/UEqn.A());
|
volScalarField rUA(1.0/UEqn.A());
|
||||||
U_ = rUA*UEqn.H();
|
U_ = rUA*UEqn.H();
|
||||||
@ -854,14 +836,11 @@ void kinematicSingleLayer::addSources
|
|||||||
const scalar energySource
|
const scalar energySource
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "\nSurface film: " << type() << ": adding to film source:" << nl
|
<< "\nSurface film: " << type() << ": adding to film source:" << nl
|
||||||
<< " mass = " << massSource << nl
|
<< " mass = " << massSource << nl
|
||||||
<< " momentum = " << momentumSource << nl
|
<< " momentum = " << momentumSource << nl
|
||||||
<< " pressure = " << pressureSource << endl;
|
<< " pressure = " << pressureSource << endl;
|
||||||
}
|
|
||||||
|
|
||||||
rhoSpPrimary_.boundaryFieldRef()[patchi][facei] -= massSource;
|
rhoSpPrimary_.boundaryFieldRef()[patchi][facei] -= massSource;
|
||||||
USpPrimary_.boundaryFieldRef()[patchi][facei] -= momentumSource;
|
USpPrimary_.boundaryFieldRef()[patchi][facei] -= momentumSource;
|
||||||
@ -873,10 +852,7 @@ void kinematicSingleLayer::addSources
|
|||||||
|
|
||||||
void kinematicSingleLayer::preEvolveRegion()
|
void kinematicSingleLayer::preEvolveRegion()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
surfaceFilmRegionModel::preEvolveRegion();
|
surfaceFilmRegionModel::preEvolveRegion();
|
||||||
|
|
||||||
@ -900,10 +876,7 @@ void kinematicSingleLayer::preEvolveRegion()
|
|||||||
|
|
||||||
void kinematicSingleLayer::evolveRegion()
|
void kinematicSingleLayer::evolveRegion()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update sub-models to provide updated source contributions
|
// Update sub-models to provide updated source contributions
|
||||||
updateSubmodels();
|
updateSubmodels();
|
||||||
@ -937,10 +910,7 @@ void kinematicSingleLayer::evolveRegion()
|
|||||||
|
|
||||||
void kinematicSingleLayer::postEvolveRegion()
|
void kinematicSingleLayer::postEvolveRegion()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reset source terms for next time integration
|
// Reset source terms for next time integration
|
||||||
resetPrimaryRegionSourceTerms();
|
resetPrimaryRegionSourceTerms();
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2017 OpenCFD Ltd
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -94,10 +94,7 @@ bool thermoSingleLayer::read()
|
|||||||
|
|
||||||
void thermoSingleLayer::resetPrimaryRegionSourceTerms()
|
void thermoSingleLayer::resetPrimaryRegionSourceTerms()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
kinematicSingleLayer::resetPrimaryRegionSourceTerms();
|
kinematicSingleLayer::resetPrimaryRegionSourceTerms();
|
||||||
|
|
||||||
@ -153,10 +150,7 @@ void thermoSingleLayer::updateSurfaceTemperatures()
|
|||||||
|
|
||||||
void thermoSingleLayer::transferPrimaryRegionThermoFields()
|
void thermoSingleLayer::transferPrimaryRegionThermoFields()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
kinematicSingleLayer::transferPrimaryRegionThermoFields();
|
kinematicSingleLayer::transferPrimaryRegionThermoFields();
|
||||||
|
|
||||||
@ -172,10 +166,7 @@ void thermoSingleLayer::transferPrimaryRegionThermoFields()
|
|||||||
|
|
||||||
void thermoSingleLayer::transferPrimaryRegionSourceFields()
|
void thermoSingleLayer::transferPrimaryRegionSourceFields()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
kinematicSingleLayer::transferPrimaryRegionSourceFields();
|
kinematicSingleLayer::transferPrimaryRegionSourceFields();
|
||||||
|
|
||||||
@ -233,10 +224,7 @@ void thermoSingleLayer::correctAlpha()
|
|||||||
|
|
||||||
void thermoSingleLayer::updateSubmodels()
|
void thermoSingleLayer::updateSubmodels()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update heat transfer coefficient sub-models
|
// Update heat transfer coefficient sub-models
|
||||||
htcs_->correct();
|
htcs_->correct();
|
||||||
@ -289,11 +277,7 @@ tmp<fvScalarMatrix> thermoSingleLayer::q(volScalarField& hs) const
|
|||||||
|
|
||||||
void thermoSingleLayer::solveEnergy()
|
void thermoSingleLayer::solveEnergy()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar residualDeltaRho
|
dimensionedScalar residualDeltaRho
|
||||||
(
|
(
|
||||||
@ -603,10 +587,8 @@ void thermoSingleLayer::addSources
|
|||||||
energySource
|
energySource
|
||||||
);
|
);
|
||||||
|
|
||||||
if (debug)
|
DebugInfo
|
||||||
{
|
<< " energy = " << energySource << nl << nl;
|
||||||
Info<< " energy = " << energySource << nl << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
hsSpPrimary_.boundaryFieldRef()[patchi][facei] -= energySource;
|
hsSpPrimary_.boundaryFieldRef()[patchi][facei] -= energySource;
|
||||||
}
|
}
|
||||||
@ -614,10 +596,7 @@ void thermoSingleLayer::addSources
|
|||||||
|
|
||||||
void thermoSingleLayer::preEvolveRegion()
|
void thermoSingleLayer::preEvolveRegion()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
kinematicSingleLayer::preEvolveRegion();
|
kinematicSingleLayer::preEvolveRegion();
|
||||||
primaryEnergyTrans_ == dimensionedScalar(dimEnergy, Zero);
|
primaryEnergyTrans_ == dimensionedScalar(dimEnergy, Zero);
|
||||||
@ -626,10 +605,7 @@ void thermoSingleLayer::preEvolveRegion()
|
|||||||
|
|
||||||
void thermoSingleLayer::evolveRegion()
|
void thermoSingleLayer::evolveRegion()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Solve continuity for deltaRho_
|
// Solve continuity for deltaRho_
|
||||||
solveContinuity();
|
solveContinuity();
|
||||||
|
|||||||
@ -27,7 +27,6 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "thermalBaffle.H"
|
#include "thermalBaffle.H"
|
||||||
|
|
||||||
#include "fvm.H"
|
#include "fvm.H"
|
||||||
#include "fvcDiv.H"
|
#include "fvcDiv.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
@ -69,10 +68,7 @@ bool thermalBaffle::read(const dictionary& dict)
|
|||||||
|
|
||||||
void thermalBaffle::solveEnergy()
|
void thermalBaffle::solveEnergy()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
const polyBoundaryMesh& rbm = regionMesh().boundaryMesh();
|
const polyBoundaryMesh& rbm = regionMesh().boundaryMesh();
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2015 OpenFOAM Foundation
|
Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -37,10 +37,7 @@ Foam::autoPtr<Foam::meshToMeshMethod> Foam::meshToMeshMethod::New
|
|||||||
const polyMesh& tgt
|
const polyMesh& tgt
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInfo << "Selecting AMIMethod " << methodName << endl;
|
||||||
{
|
|
||||||
Info<< "Selecting AMIMethod " << methodName << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto cstrIter = componentsConstructorTablePtr_->cfind(methodName);
|
auto cstrIter = componentsConstructorTablePtr_->cfind(methodName);
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2017 OpenFOAM Foundation
|
Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2018 OpenCFD Ltd.
|
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -66,22 +66,18 @@ Foam::label Foam::meshToMesh::calcDistribution
|
|||||||
if (nHaveCells > 1)
|
if (nHaveCells > 1)
|
||||||
{
|
{
|
||||||
proci = -1;
|
proci = -1;
|
||||||
if (debug)
|
|
||||||
{
|
DebugInFunction
|
||||||
InfoInFunction
|
|
||||||
<< "Meshes split across multiple processors" << endl;
|
<< "Meshes split across multiple processors" << endl;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (nHaveCells == 1)
|
else if (nHaveCells == 1)
|
||||||
{
|
{
|
||||||
proci = cellsPresentOnProc.find(1);
|
proci = cellsPresentOnProc.find(1);
|
||||||
if (debug)
|
|
||||||
{
|
DebugInFunction
|
||||||
InfoInFunction
|
|
||||||
<< "Meshes local to processor" << proci << endl;
|
<< "Meshes local to processor" << proci << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return proci;
|
return proci;
|
||||||
}
|
}
|
||||||
@ -888,12 +884,9 @@ void Foam::meshToMesh::distributeAndMergeCells
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (hasMerged)
|
if (hasMerged)
|
||||||
{
|
|
||||||
if (debug)
|
|
||||||
{
|
{
|
||||||
Pout<< "Merged from " << tgtPoints.size()
|
Pout<< "Merged from " << tgtPoints.size()
|
||||||
<< " down to " << newTgtPoints.size() << " points" << endl;
|
<< " down to " << newTgtPoints.size() << " points" << endl;
|
||||||
}
|
|
||||||
|
|
||||||
tgtPoints.transfer(newTgtPoints);
|
tgtPoints.transfer(newTgtPoints);
|
||||||
forAll(tgtFaces, i)
|
forAll(tgtFaces, i)
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -41,11 +42,8 @@ Description
|
|||||||
|
|
||||||
void Foam::meshToMesh0::calcAddressing()
|
void Foam::meshToMesh0::calcAddressing()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Calculating mesh-to-mesh cell addressing" << endl;
|
<< "Calculating mesh-to-mesh cell addressing" << endl;
|
||||||
}
|
|
||||||
|
|
||||||
// set reference to cells
|
// set reference to cells
|
||||||
const cellList& fromCells = fromMesh_.cells();
|
const cellList& fromCells = fromMesh_.cells();
|
||||||
@ -62,10 +60,7 @@ void Foam::meshToMesh0::calcAddressing()
|
|||||||
|
|
||||||
// visit all boundaries and mark the cell next to the boundary.
|
// visit all boundaries and mark the cell next to the boundary.
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction << "Setting up rescue" << endl;
|
||||||
{
|
|
||||||
InfoInFunction << "Setting up rescue" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<bool> boundaryCell(fromCells.size(), false);
|
List<bool> boundaryCell(fromCells.size(), false);
|
||||||
|
|
||||||
@ -93,13 +88,11 @@ void Foam::meshToMesh0::calcAddressing()
|
|||||||
meshBb.max() + vector(typDim, typDim, typDim)
|
meshBb.max() + vector(typDim, typDim, typDim)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (debug)
|
DebugInfo
|
||||||
{
|
<< "\nMesh" << nl
|
||||||
Info<< "\nMesh" << endl;
|
<< " bounding box : " << meshBb << nl
|
||||||
Info<< " bounding box : " << meshBb << endl;
|
<< " bounding box (shifted) : " << shiftedBb << nl
|
||||||
Info<< " bounding box (shifted) : " << shiftedBb << endl;
|
<< " typical dimension : " << shiftedBb.typDim() << endl;
|
||||||
Info<< " typical dimension :" << shiftedBb.typDim() << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
indexedOctree<treeDataCell> oc
|
indexedOctree<treeDataCell> oc
|
||||||
(
|
(
|
||||||
@ -203,11 +196,8 @@ void Foam::meshToMesh0::calcAddressing()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Finished calculating mesh-to-mesh cell addressing" << endl;
|
<< "Finished calculating mesh-to-mesh cell addressing" << endl;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -179,7 +179,7 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
InfoInFunction << endl;
|
InfoInFunction << nl;
|
||||||
forAll(nearest, samplei)
|
forAll(nearest, samplei)
|
||||||
{
|
{
|
||||||
label proci = nearest[samplei].second().second();
|
label proci = nearest[samplei].second().second();
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2018 OpenCFD Ltd.
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -56,10 +56,7 @@ void Foam::patchCloudSet::calcSamples
|
|||||||
DynamicList<scalar>& samplingCurveDist
|
DynamicList<scalar>& samplingCurveDist
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInfo << "patchCloudSet : sampling on patches :" << endl;
|
||||||
{
|
|
||||||
Info<< "patchCloudSet : sampling on patches :" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Construct search tree for all patch faces.
|
// Construct search tree for all patch faces.
|
||||||
label sz = 0;
|
label sz = 0;
|
||||||
@ -69,10 +66,7 @@ void Foam::patchCloudSet::calcSamples
|
|||||||
|
|
||||||
sz += pp.size();
|
sz += pp.size();
|
||||||
|
|
||||||
if (debug)
|
DebugInfo << " " << pp.name() << " size " << pp.size() << endl;
|
||||||
{
|
|
||||||
Info<< " " << pp.name() << " size " << pp.size() << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
labelList patchFaces(sz);
|
labelList patchFaces(sz);
|
||||||
|
|||||||
@ -56,10 +56,7 @@ void Foam::patchSeedSet::calcSamples
|
|||||||
DynamicList<scalar>& samplingCurveDist
|
DynamicList<scalar>& samplingCurveDist
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInfo << "patchSeedSet : sampling on patches :" << endl;
|
||||||
{
|
|
||||||
Info<< "patchSeedSet : sampling on patches :" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Construct search tree for all patch faces.
|
// Construct search tree for all patch faces.
|
||||||
label sz = 0;
|
label sz = 0;
|
||||||
@ -69,10 +66,7 @@ void Foam::patchSeedSet::calcSamples
|
|||||||
|
|
||||||
sz += pp.size();
|
sz += pp.size();
|
||||||
|
|
||||||
if (debug)
|
DebugInfo << " " << pp.name() << " size " << pp.size() << endl;
|
||||||
{
|
|
||||||
Info<< " " << pp.name() << " size " << pp.size() << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
labelList patchFaces(sz);
|
labelList patchFaces(sz);
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2018-2019 OpenCFD Ltd.
|
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -363,19 +363,16 @@ bool Foam::sampledSet::getTrackingPoint
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< " samplePt:" << samplePt
|
<< " samplePt:" << samplePt
|
||||||
<< " bPoint:" << bPoint
|
<< " bPoint:" << bPoint
|
||||||
<< " bFacei:" << bFacei
|
<< " bFacei:" << bFacei << nl
|
||||||
<< endl << " Calculated first tracking point :"
|
<< " Calculated first tracking point :"
|
||||||
<< " trackPt:" << trackPt
|
<< " trackPt:" << trackPt
|
||||||
<< " trackCelli:" << trackCelli
|
<< " trackCelli:" << trackCelli
|
||||||
<< " trackFacei:" << trackFacei
|
<< " trackFacei:" << trackFacei
|
||||||
<< " isGoodSample:" << isGoodSample
|
<< " isGoodSample:" << isGoodSample
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
|
||||||
|
|
||||||
return isGoodSample;
|
return isGoodSample;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -203,7 +203,7 @@ Foam::ensightSurfaceReader::readGeometryHeader(ensightReadFile& is) const
|
|||||||
|
|
||||||
void Foam::ensightSurfaceReader::readCase(IFstream& is)
|
void Foam::ensightSurfaceReader::readCase(IFstream& is)
|
||||||
{
|
{
|
||||||
DebugInFunction<< nl;
|
DebugInFunction << endl;
|
||||||
|
|
||||||
if (!is.good())
|
if (!is.good())
|
||||||
{
|
{
|
||||||
@ -259,12 +259,12 @@ void Foam::ensightSurfaceReader::readCase(IFstream& is)
|
|||||||
}
|
}
|
||||||
else if (debug)
|
else if (debug)
|
||||||
{
|
{
|
||||||
Info<<"variable line: " << parsed.size();
|
Info<< "variable line: " << parsed.size();
|
||||||
for (const auto& s : parsed)
|
for (const auto& s : parsed)
|
||||||
{
|
{
|
||||||
Info<<" " << s.str();
|
Info<< " " << s.str();
|
||||||
}
|
}
|
||||||
Info<<nl;
|
Info<< nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldNames.append(parsed[parsed.size()-2].str());
|
fieldNames.append(parsed[parsed.size()-2].str());
|
||||||
@ -332,7 +332,7 @@ Foam::ensightSurfaceReader::ensightSurfaceReader(const fileName& fName)
|
|||||||
|
|
||||||
const Foam::meshedSurface& Foam::ensightSurfaceReader::geometry()
|
const Foam::meshedSurface& Foam::ensightSurfaceReader::geometry()
|
||||||
{
|
{
|
||||||
DebugInFunction<< nl;
|
DebugInFunction << endl;
|
||||||
|
|
||||||
if (!surfPtr_.valid())
|
if (!surfPtr_.valid())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015-2018 OpenCFD Ltd.
|
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -65,10 +65,7 @@ Foam::tmp<Foam::Field<Type>> Foam::ensightSurfaceReader::readField
|
|||||||
const label fieldIndex
|
const label fieldIndex
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
const word& fieldName(fieldNames_[fieldIndex]);
|
const word& fieldName(fieldNames_[fieldIndex]);
|
||||||
const label fileIndex = timeStartIndex_ + timeIndex*timeIncrement_;
|
const label fileIndex = timeStartIndex_ + timeIndex*timeIncrement_;
|
||||||
@ -106,10 +103,7 @@ Foam::tmp<Foam::Field<Type>> Foam::ensightSurfaceReader::readField
|
|||||||
is.read(primitiveType);
|
is.read(primitiveType);
|
||||||
|
|
||||||
|
|
||||||
if (debug)
|
DebugInfo << "primitiveType: " << primitiveType << endl;
|
||||||
{
|
|
||||||
Info<< "primitiveType: " << primitiveType << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (primitiveType != pTraits<Type>::typeName)
|
if (primitiveType != pTraits<Type>::typeName)
|
||||||
{
|
{
|
||||||
@ -139,11 +133,9 @@ Foam::tmp<Foam::Field<Type>> Foam::ensightSurfaceReader::readField
|
|||||||
// Read data file using schema generated while reading the surface
|
// Read data file using schema generated while reading the surface
|
||||||
forAll(schema_, i)
|
forAll(schema_, i)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInfo
|
||||||
{
|
<< "Reading face type "
|
||||||
const string& faceType = schema_[i].first();
|
<< schema_[i].first() << " data" << endl;
|
||||||
Info<< "Reading face type " << faceType << " data" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
const label nFace = schema_[i].second();
|
const label nFace = schema_[i].second();
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -131,13 +131,11 @@ Foam::sampledPlane::sampledPlane
|
|||||||
const point orig = cs.globalPosition(pln.origin());
|
const point orig = cs.globalPosition(pln.origin());
|
||||||
const vector norm = cs.globalVector(pln.normal());
|
const vector norm = cs.globalVector(pln.normal());
|
||||||
|
|
||||||
if (debug)
|
DebugInfo
|
||||||
{
|
<< "plane " << name << " :"
|
||||||
Info<< "plane " << name << " :"
|
|
||||||
<< " origin:" << origin()
|
<< " origin:" << origin()
|
||||||
<< " normal:" << normal()
|
<< " normal:" << normal()
|
||||||
<< " defined within a local coordinateSystem" << endl;
|
<< " defined within a local coordinateSystem" << endl;
|
||||||
}
|
|
||||||
|
|
||||||
// Reassign the plane
|
// Reassign the plane
|
||||||
pln = plane(orig, norm);
|
pln = plane(orig, norm);
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -74,11 +74,8 @@ void Foam::radiation::viewFactor::initialise()
|
|||||||
totalNCoarseFaces_ = nLocalCoarseFaces_;
|
totalNCoarseFaces_ = nLocalCoarseFaces_;
|
||||||
reduce(totalNCoarseFaces_, sumOp<label>());
|
reduce(totalNCoarseFaces_, sumOp<label>());
|
||||||
|
|
||||||
if (debug && Pstream::master())
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Total number of clusters : " << totalNCoarseFaces_ << endl;
|
<< "Total number of clusters : " << totalNCoarseFaces_ << endl;
|
||||||
}
|
|
||||||
|
|
||||||
map_.reset
|
map_.reset
|
||||||
(
|
(
|
||||||
@ -139,11 +136,8 @@ void Foam::radiation::viewFactor::initialise()
|
|||||||
new scalarSquareMatrix(totalNCoarseFaces_, Zero)
|
new scalarSquareMatrix(totalNCoarseFaces_, Zero)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Insert elements in the matrix..." << endl;
|
<< "Insert elements in the matrix..." << endl;
|
||||||
}
|
|
||||||
|
|
||||||
for (label procI = 0; procI < Pstream::nProcs(); procI++)
|
for (label procI = 0; procI < Pstream::nProcs(); procI++)
|
||||||
{
|
{
|
||||||
@ -160,11 +154,7 @@ void Foam::radiation::viewFactor::initialise()
|
|||||||
|
|
||||||
if (coeffs_.get<bool>("smoothing"))
|
if (coeffs_.get<bool>("smoothing"))
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Smoothing the matrix..." << endl;
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Smoothing the matrix..." << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (label i=0; i<totalNCoarseFaces_; i++)
|
for (label i=0; i<totalNCoarseFaces_; i++)
|
||||||
{
|
{
|
||||||
@ -576,11 +566,7 @@ void Foam::radiation::viewFactor::calculate()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
DebugInFunction << "\nDecomposing C matrix..." << endl;
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "\nDecomposing C matrix..." << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
LUDecompose(CLU_(), pivotIndices_);
|
LUDecompose(CLU_(), pivotIndices_);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015-2017 OpenCFD Ltd.
|
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -116,11 +116,9 @@ void Foam::solarCalculator::calculateBetaTheta()
|
|||||||
theta_ += 2*(constant::mathematical::pi - theta_);
|
theta_ += 2*(constant::mathematical::pi - theta_);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
DebugInfo
|
||||||
{
|
<< tab << "altitude : " << radToDeg(beta_) << nl
|
||||||
Info << tab << "altitude : " << radToDeg(beta_) << endl;
|
<< tab << "azimuth : " << radToDeg(theta_) << endl;
|
||||||
Info << tab << "azimuth : " << radToDeg(theta_) << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -141,18 +139,14 @@ void Foam::solarCalculator::calculateSunDirection()
|
|||||||
|
|
||||||
direction_.normalise();
|
direction_.normalise();
|
||||||
|
|
||||||
if (debug)
|
DebugInfo
|
||||||
{
|
<< "Sun direction in absolute coordinates : " << direction_ <<endl;
|
||||||
Info<< "Sun direction in absolute coordinates : " << direction_ <<endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Transform to actual coordinate system
|
// Transform to actual coordinate system
|
||||||
direction_ = coord_->transform(direction_);
|
direction_ = coord_->transform(direction_);
|
||||||
|
|
||||||
if (debug)
|
DebugInfo
|
||||||
{
|
<< "Sun direction in the Grid coordinates : " << direction_ <<endl;
|
||||||
Info<< "Sun direction in the Grid coordinates : " << direction_ <<endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -398,22 +398,17 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::~heheuPsiThermo()
|
|||||||
template<class BasicPsiThermo, class MixtureType>
|
template<class BasicPsiThermo, class MixtureType>
|
||||||
void Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::correct()
|
void Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::correct()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << endl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// force the saving of the old-time values
|
// force the saving of the old-time values
|
||||||
this->psi_.oldTime();
|
this->psi_.oldTime();
|
||||||
|
|
||||||
calculate();
|
calculate();
|
||||||
|
|
||||||
if (debug)
|
DebugInfo << " Finished" << endl;
|
||||||
{
|
|
||||||
Info<< " Finished" << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
template<class BasicPsiThermo, class MixtureType>
|
template<class BasicPsiThermo, class MixtureType>
|
||||||
void Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::correctT()
|
void Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::correctT()
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2018 OpenCFD Ltd
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -218,17 +218,11 @@ Foam::heSolidThermo<BasicSolidThermo, MixtureType>::~heSolidThermo()
|
|||||||
template<class BasicSolidThermo, class MixtureType>
|
template<class BasicSolidThermo, class MixtureType>
|
||||||
void Foam::heSolidThermo<BasicSolidThermo, MixtureType>::correct()
|
void Foam::heSolidThermo<BasicSolidThermo, MixtureType>::correct()
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << nl;
|
||||||
{
|
|
||||||
InfoInFunction << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
calculate();
|
calculate();
|
||||||
|
|
||||||
if (debug)
|
DebugInfo << " Finished" << endl;
|
||||||
{
|
|
||||||
Info<< " Finished" << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -92,10 +92,7 @@ Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New
|
|||||||
const word& name
|
const word& name
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Constructing liquidProperties" << nl;
|
||||||
{
|
|
||||||
InfoInFunction << "Constructing liquidProperties" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto cstrIter = ConstructorTablePtr_->cfind(name);
|
auto cstrIter = ConstructorTablePtr_->cfind(name);
|
||||||
|
|
||||||
@ -118,10 +115,7 @@ Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Constructing liquidProperties" << nl;
|
||||||
{
|
|
||||||
InfoInFunction << "Constructing liquidProperties" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
const word liquidType(dict.dictName());
|
const word liquidType(dict.dictName());
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2018 OpenCFD Ltd.
|
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -176,12 +176,7 @@ void Foam::mixerFvMesh::addZonesAndModifiers()
|
|||||||
|
|
||||||
void Foam::mixerFvMesh::calcMovingMasks() const
|
void Foam::mixerFvMesh::calcMovingMasks() const
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Calculating point and cell masks" << endl;
|
||||||
{
|
|
||||||
InfoInFunction
|
|
||||||
<< "Calculating point and cell masks"
|
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (movingPointsMaskPtr_)
|
if (movingPointsMaskPtr_)
|
||||||
{
|
{
|
||||||
@ -340,10 +335,7 @@ bool Foam::mixerFvMesh::update()
|
|||||||
|
|
||||||
if (topoChangeMap.valid())
|
if (topoChangeMap.valid())
|
||||||
{
|
{
|
||||||
if (debug)
|
DebugInFunction << "Mesh topology is changing" << nl;
|
||||||
{
|
|
||||||
InfoInFunction << "Mesh topology is changing" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
deleteDemandDrivenData(movingPointsMaskPtr_);
|
deleteDemandDrivenData(movingPointsMaskPtr_);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -72,7 +72,7 @@ functions
|
|||||||
|
|
||||||
dimensionedScalar uInfX("uInfx", dimVelocity, ULeft);
|
dimensionedScalar uInfX("uInfx", dimVelocity, ULeft);
|
||||||
|
|
||||||
Info << "U at inlet = " << uInfX.value() << " m/s" << endl;
|
Info<< "U at inlet = " << uInfX.value() << " m/s" << endl;
|
||||||
|
|
||||||
|
|
||||||
scalar magCylinder = 0.0;
|
scalar magCylinder = 0.0;
|
||||||
@ -86,7 +86,7 @@ functions
|
|||||||
|
|
||||||
dimensionedScalar radius("radius", dimLength, magCylinder);
|
dimensionedScalar radius("radius", dimLength, magCylinder);
|
||||||
|
|
||||||
Info << "Cylinder radius = " << radius.value() << " m" << endl;
|
Info<< "Cylinder radius = " << radius.value() << " m" << endl;
|
||||||
|
|
||||||
volVectorField UA
|
volVectorField UA
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user