diff --git a/applications/solvers/finiteArea/liquidFilmFoam/liquidFilmFoam.C b/applications/solvers/finiteArea/liquidFilmFoam/liquidFilmFoam.C
index 192e69872f..ba08a67a46 100644
--- a/applications/solvers/finiteArea/liquidFilmFoam/liquidFilmFoam.C
+++ b/applications/solvers/finiteArea/liquidFilmFoam/liquidFilmFoam.C
@@ -143,9 +143,9 @@ int main(int argc, char *argv[])
runTime.write();
}
- Info<< "ExecutionTime = "
- << scalar(runTime.elapsedCpuTime())
- << " s\n" << endl << endl;
+ Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
+ << " ClockTime = " << runTime.elapsedClockTime() << " s"
+ << nl << endl;
}
return 0;
diff --git a/applications/solvers/finiteArea/sphereSurfactantFoam/surfactantFoam.C b/applications/solvers/finiteArea/sphereSurfactantFoam/surfactantFoam.C
index e99f01b19a..408d85e8c1 100644
--- a/applications/solvers/finiteArea/sphereSurfactantFoam/surfactantFoam.C
+++ b/applications/solvers/finiteArea/sphereSurfactantFoam/surfactantFoam.C
@@ -74,9 +74,9 @@ int main(int argc, char *argv[])
Info<< "Total mass of surfactant: "
<< sum(Cs.internalField()*aMesh.S()) << endl;
- Info<< "ExecutionTime = "
- << scalar(runTime.elapsedCpuTime())
- << " s\n" << endl << endl;
+ Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
+ << " ClockTime = " << runTime.elapsedClockTime() << " s"
+ << nl << endl;
}
return 0;
diff --git a/bin/tools/CleanFunctions b/bin/tools/CleanFunctions
index 4e92ec6e15..431c52f383 100644
--- a/bin/tools/CleanFunctions
+++ b/bin/tools/CleanFunctions
@@ -3,7 +3,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
-# \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
+# \\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
@@ -41,7 +41,8 @@ cleanTimeDirectories()
done
rm -rf \
./[1-9]* ./-[1-9]* ./log ./log.* ./log-* ./logSummary.* \
- ./.fxLock ./*.xml ./ParaView* ./paraFoam* ./*.OpenFOAM ./*.blockMesh \
+ ./.fxLock ./*.xml ./ParaView* ./paraFoam* \
+ ./*.blockMesh ./*.foam ./*.OpenFOAM \
./.setSet > /dev/null 2>&1
}
@@ -149,8 +150,12 @@ cleanUcomponents()
cleanFaMesh ()
{
- rm -rf ./constant/faMesh/{faceLabels*,faBoundary*} \
- > /dev/null 2>&1
+ (
+ cd constant/faMesh 2>/dev/null && \
+ rm -rf \
+ faceLabels* faBoundary* \
+ > /dev/null 2>&1 \
+ )
}
cleanApplication()
diff --git a/src/finiteArea/Make/files b/src/finiteArea/Make/files
index 9e8ffce869..ada1c980cd 100644
--- a/src/finiteArea/Make/files
+++ b/src/finiteArea/Make/files
@@ -6,7 +6,7 @@ faMesh/faBoundaryMesh/faBoundaryMesh.C
faPatches = faMesh/faPatches
$(faPatches)/faPatch/faPatch.C
-$(faPatches)/faPatch/newFaPatch.C
+$(faPatches)/faPatch/faPatchNew.C
$(faPatches)/basic/coupled/coupledFaPatch.C
$(faPatches)/constraint/empty/emptyFaPatch.C
$(faPatches)/constraint/processor/processorFaPatch.C
@@ -24,7 +24,6 @@ faPatchFields = fields/faPatchFields
$(faPatchFields)/faPatchField/faPatchFields.C
basicFaPatchFields = $(faPatchFields)/basic
-$(basicFaPatchFields)/basicSymmetry/basicSymmetryFaPatchFields.C
$(basicFaPatchFields)/basicSymmetry/basicSymmetryFaPatchScalarField.C
$(basicFaPatchFields)/calculated/calculatedFaPatchFields.C
$(basicFaPatchFields)/coupled/coupledFaPatchFields.C
diff --git a/src/finiteArea/areaMesh/areaFaMesh.H b/src/finiteArea/areaMesh/areaFaMesh.H
index 9899b376d1..2e506b1217 100644
--- a/src/finiteArea/areaMesh/areaFaMesh.H
+++ b/src/finiteArea/areaMesh/areaFaMesh.H
@@ -24,7 +24,7 @@ License
along with OpenFOAM. If not, see .
Class
- areaMesh
+ Foam::areaMesh
Description
Mesh data needed to do the Finite Area discretisation.
diff --git a/src/finiteArea/edgeMesh/edgeFaMesh.H b/src/finiteArea/edgeMesh/edgeFaMesh.H
index f5c5dca635..6631f96c25 100644
--- a/src/finiteArea/edgeMesh/edgeFaMesh.H
+++ b/src/finiteArea/edgeMesh/edgeFaMesh.H
@@ -24,7 +24,7 @@ License
along with OpenFOAM. If not, see .
Class
- edgeMesh
+ Foam::edgeMesh
Description
Mesh data needed to do the Finite Area discretisation.
diff --git a/src/finiteArea/faMatrices/faMatrices.H b/src/finiteArea/faMatrices/faMatrices.H
index 30d12db5db..42368b28ba 100644
--- a/src/finiteArea/faMatrices/faMatrices.H
+++ b/src/finiteArea/faMatrices/faMatrices.H
@@ -24,7 +24,7 @@ License
along with OpenFOAM. If not, see .
Class
- faMatrix
+ Foam::faMatrix
Description
A special matrix type and solver, designed for finite area
diff --git a/src/finiteArea/faMatrices/faMatrix/faMatrix.C b/src/finiteArea/faMatrices/faMatrix/faMatrix.C
index 208a1b72ed..0e7040f453 100644
--- a/src/finiteArea/faMatrices/faMatrix/faMatrix.C
+++ b/src/finiteArea/faMatrices/faMatrix/faMatrix.C
@@ -23,27 +23,19 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see .
-Description
- Finite-Area matrix
-
\*---------------------------------------------------------------------------*/
#include "areaFields.H"
#include "edgeFields.H"
#include "calculatedFaPatchFields.H"
#include "zeroGradientFaPatchFields.H"
-#include "coupledFaPatchFields.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
+#include "demandDrivenData.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template
template
-void faMatrix::addToInternalField
+void Foam::faMatrix::addToInternalField
(
const labelUList& addr,
const Field& pf,
@@ -52,11 +44,8 @@ void faMatrix::addToInternalField
{
if (addr.size() != pf.size())
{
- FatalErrorIn
- (
- "faMatrix::addToInternalField(const labelUList&, "
- "const Field&, Field&)"
- ) << "sizes of addressing and field are different"
+ FatalErrorInFunction
+ << "sizes of addressing and field are different"
<< abort(FatalError);
}
@@ -69,10 +58,10 @@ void faMatrix::addToInternalField
template
template
-void faMatrix::addToInternalField
+void Foam::faMatrix::addToInternalField
(
const labelUList& addr,
- const tmp >& tpf,
+ const tmp>& tpf,
Field& intf
) const
{
@@ -83,7 +72,7 @@ void faMatrix::addToInternalField
template
template
-void faMatrix::subtractFromInternalField
+void Foam::faMatrix::subtractFromInternalField
(
const labelUList& addr,
const Field& pf,
@@ -92,11 +81,8 @@ void faMatrix::subtractFromInternalField
{
if (addr.size() != pf.size())
{
- FatalErrorIn
- (
- "faMatrix::addToInternalField(const labelUList&, "
- "const Field&, Field&)"
- ) << "sizes of addressing and field are different"
+ FatalErrorInFunction
+ << "sizes of addressing and field are different"
<< abort(FatalError);
}
@@ -109,10 +95,10 @@ void faMatrix::subtractFromInternalField
template
template
-void faMatrix::subtractFromInternalField
+void Foam::faMatrix::subtractFromInternalField
(
const labelUList& addr,
- const tmp >& tpf,
+ const tmp>& tpf,
Field& intf
) const
{
@@ -122,7 +108,7 @@ void faMatrix::subtractFromInternalField
template
-void faMatrix::addBoundaryDiag
+void Foam::faMatrix::addBoundaryDiag
(
scalarField& diag,
const direction solveCmpt
@@ -141,7 +127,7 @@ void faMatrix::addBoundaryDiag
template
-void faMatrix::addCmptAvBoundaryDiag(scalarField& diag) const
+void Foam::faMatrix::addCmptAvBoundaryDiag(scalarField& diag) const
{
forAll(internalCoeffs_, patchI)
{
@@ -156,7 +142,7 @@ void faMatrix::addCmptAvBoundaryDiag(scalarField& diag) const
template
-void faMatrix::addBoundarySource
+void Foam::faMatrix::addBoundarySource
(
Field& source,
const bool couples
@@ -173,7 +159,7 @@ void faMatrix::addBoundarySource
}
else if (couples)
{
- tmp > tpnf = ptf.patchNeighbourField();
+ tmp> tpnf = ptf.patchNeighbourField();
const Field& pnf = tpnf();
const labelUList& addr = lduAddr().patchAddr(patchI);
@@ -190,7 +176,7 @@ void faMatrix::addBoundarySource
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
template
-faMatrix::faMatrix
+Foam::faMatrix::faMatrix
(
const GeometricField& psi,
const dimensionSet& ds
@@ -202,18 +188,14 @@ faMatrix::faMatrix
source_(psi.size(), pTraits::zero),
internalCoeffs_(psi.mesh().boundary().size()),
boundaryCoeffs_(psi.mesh().boundary().size()),
- faceFluxCorrectionPtr_(NULL)
+ faceFluxCorrectionPtr_(nullptr)
{
- if (debug)
- {
- Info<< "faMatrix(const GeometricField&,"
- " const dimensionSet&) : "
- "constructing faMatrix for field " << psi_.name()
- << endl;
- }
+ DebugInFunction
+ << "constructing faMatrix for field " << psi_.name()
+ << endl;
// Initialise coupling coefficients
- forAll (psi.mesh().boundary(), patchI)
+ forAll(psi.mesh().boundary(), patchI)
{
internalCoeffs_.set
(
@@ -247,7 +229,7 @@ faMatrix::faMatrix
template
-faMatrix::faMatrix(const faMatrix& fam)
+Foam::faMatrix::faMatrix(const faMatrix& fam)
:
refCount(),
lduMatrix(fam),
@@ -256,14 +238,11 @@ faMatrix::faMatrix(const faMatrix& fam)
source_(fam.source_),
internalCoeffs_(fam.internalCoeffs_),
boundaryCoeffs_(fam.boundaryCoeffs_),
- faceFluxCorrectionPtr_(NULL)
+ faceFluxCorrectionPtr_(nullptr)
{
- if (debug)
- {
- Info<< "faMatrix::faMatrix(const faMatrix&) : "
- << "copying faMatrix for field " << psi_.name()
- << endl;
- }
+ DebugInFunction
+ << "copying faMatrix for field " << psi_.name()
+ << endl;
if (fam.faceFluxCorrectionPtr_)
{
@@ -277,7 +256,7 @@ faMatrix::faMatrix(const faMatrix& fam)
template
-faMatrix::faMatrix
+Foam::faMatrix::faMatrix
(
const GeometricField& psi,
Istream& is
@@ -289,18 +268,14 @@ faMatrix::faMatrix
source_(is),
internalCoeffs_(psi.mesh().boundary().size()),
boundaryCoeffs_(psi.mesh().boundary().size()),
- faceFluxCorrectionPtr_(NULL)
+ faceFluxCorrectionPtr_(nullptr)
{
- if (debug)
- {
- Info<< "faMatrix(const GeometricField&,"
- " Istream&) : "
- "constructing faMatrix for field " << psi_.name()
- << endl;
- }
+ DebugInFunction
+ << "constructing faMatrix for field " << psi_.name()
+ << endl;
// Initialise coupling coefficients
- forAll (psi.mesh().boundary(), patchI)
+ forAll(psi.mesh().boundary(), patchI)
{
internalCoeffs_.set
(
@@ -327,28 +302,20 @@ faMatrix::faMatrix
template
-faMatrix::~faMatrix()
+Foam::faMatrix::~faMatrix()
{
- if (debug)
- {
- Info<< "faMatrix::~faMatrix() : "
- << "destroying faMatrix for field " << psi_.name()
- << endl;
- }
+ DebugInFunction
+ << "destroying faMatrix for field " << psi_.name()
+ << endl;
- if (faceFluxCorrectionPtr_)
- {
- delete faceFluxCorrectionPtr_;
- }
+ deleteDemandDrivenData(faceFluxCorrectionPtr_);
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
-// Set solution in given faces and eliminate corresponding
-// equations from the matrix
template
-void faMatrix::setValues
+void Foam::faMatrix::setValues
(
const labelUList& faceLabels,
const UList& values
@@ -357,9 +324,9 @@ void faMatrix::setValues
const faMesh& mesh = psi_.mesh();
// Record face labels of eliminated equations
- forAll (faceLabels, i)
+ for (const label i : faceLabels)
{
- this->eliminatedEqns().insert(faceLabels[i]);
+ this->eliminatedEqns().insert(i);
}
const labelListList& edges = mesh.patch().faceEdges();
@@ -441,9 +408,8 @@ void faMatrix::setValues
}
-// Set reference level for solution
template
-void faMatrix::setReference
+void Foam::faMatrix::setReference
(
const label facei,
const Type& value
@@ -461,7 +427,7 @@ void faMatrix::setReference
template
-void faMatrix::relax(const scalar alpha)
+void Foam::faMatrix::relax(const scalar alpha)
{
if (alpha <= 0)
{
@@ -551,7 +517,7 @@ void faMatrix::relax(const scalar alpha)
template
-void faMatrix::relax()
+void Foam::faMatrix::relax()
{
if (psi_.mesh().solutionDict().relaxEquation(psi_.name()))
{
@@ -559,18 +525,15 @@ void faMatrix::relax()
}
else
{
- if (debug)
- {
- InfoIn("void faMatrix::relax()")
- << "Relaxation factor for field " << psi_.name()
- << " not found. Relaxation will not be used." << endl;
- }
+ DebugInFunction
+ << "Relaxation factor for field " << psi_.name()
+ << " not found. Relaxation will not be used." << endl;
}
}
template
-tmp faMatrix::D() const
+Foam::tmp Foam::faMatrix::D() const
{
tmp tdiag(new scalarField(diag()));
addCmptAvBoundaryDiag(tdiag.ref());
@@ -579,7 +542,7 @@ tmp faMatrix::D() const
template
-tmp faMatrix::A() const
+Foam::tmp Foam::faMatrix::A() const
{
tmp tAphi
(
@@ -605,9 +568,10 @@ tmp faMatrix::A() const
template
-tmp > faMatrix::H() const
+Foam::tmp>
+Foam::faMatrix::H() const
{
- tmp > tHphi
+ tmp> tHphi
(
new GeometricField
(
@@ -625,7 +589,7 @@ tmp > faMatrix::H() const
GeometricField& Hphi = tHphi.ref();
// Loop over field components
- for (direction cmpt=0; cmpt > faMatrix::H() const
template
-tmp > faMatrix::
-flux() const
+Foam::tmp>
+Foam::faMatrix::flux() const
{
if (!psi_.mesh().schemesDict().fluxRequired(psi_.name()))
{
- FatalErrorIn("faMatrix::flux()")
+ FatalErrorInFunction
<< "flux requested but " << psi_.name()
<< " not specified in the fluxRequired sub-dictionary of faSchemes"
<< abort(FatalError);
}
// construct GeometricField
- tmp > tfieldFlux
+ tmp> tfieldFlux
(
new GeometricField
(
@@ -677,7 +641,7 @@ flux() const
GeometricField& fieldFlux =
tfieldFlux.ref();
- for (direction cmpt=0; cmpt::nComponents; cmpt++)
+ for (direction cmpt=0; cmpt::nComponents; ++cmpt)
{
fieldFlux.primitiveFieldRef().replace
(
@@ -731,18 +695,18 @@ flux() const
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template
-void faMatrix::operator=(const faMatrix& famv)
+void Foam::faMatrix::operator=(const faMatrix& famv)
{
if (this == &famv)
{
- FatalErrorIn("faMatrix::operator=(const faMatrix&)")
+ FatalErrorInFunction
<< "attempted to assignment to self"
<< abort(FatalError);
}
if (&psi_ != &(famv.psi_))
{
- FatalErrorIn("faMatrix::operator=(const faMatrix&)")
+ FatalErrorInFunction
<< "different fields"
<< abort(FatalError);
}
@@ -766,7 +730,7 @@ void faMatrix::operator=(const faMatrix& famv)
template
-void faMatrix::operator=(const tmp >& tfamv)
+void Foam::faMatrix::operator=(const tmp>& tfamv)
{
operator=(tfamv());
tfamv.clear();
@@ -774,7 +738,7 @@ void faMatrix::operator=(const tmp >& tfamv)
template
-void faMatrix::negate()
+void Foam::faMatrix::negate()
{
lduMatrix::negate();
source_.negate();
@@ -789,7 +753,7 @@ void faMatrix::negate()
template
-void faMatrix::operator+=(const faMatrix& famv)
+void Foam::faMatrix::operator+=(const faMatrix& famv)
{
checkMethod(*this, famv, "+=");
@@ -815,7 +779,7 @@ void faMatrix::operator+=(const faMatrix& famv)
template
-void faMatrix::operator+=(const tmp >& tfamv)
+void Foam::faMatrix::operator+=(const tmp>& tfamv)
{
operator+=(tfamv());
tfamv.clear();
@@ -823,7 +787,7 @@ void faMatrix::operator+=(const tmp >& tfamv)
template
-void faMatrix::operator-=(const faMatrix& famv)
+void Foam::faMatrix::operator-=(const faMatrix& famv)
{
checkMethod(*this, famv, "+=");
@@ -847,7 +811,7 @@ void faMatrix::operator-=(const faMatrix& famv)
template
-void faMatrix::operator-=(const tmp >& tfamv)
+void Foam::faMatrix::operator-=(const tmp>& tfamv)
{
operator-=(tfamv());
tfamv.clear();
@@ -855,7 +819,7 @@ void faMatrix::operator-=(const tmp >& tfamv)
template
-void faMatrix::operator+=
+void Foam::faMatrix::operator+=
(
const GeometricField& su
)
@@ -866,9 +830,9 @@ void faMatrix::operator+=
template
-void faMatrix::operator+=
+void Foam::faMatrix::operator+=
(
- const tmp >& tsu
+ const tmp>& tsu
)
{
operator+=(tsu());
@@ -877,7 +841,7 @@ void faMatrix::operator+=
template
-void faMatrix::operator-=
+void Foam::faMatrix::operator-=
(
const GeometricField& su
)
@@ -888,9 +852,9 @@ void faMatrix::operator-=
template
-void faMatrix::operator-=
+void Foam::faMatrix::operator-=
(
- const tmp >& tsu
+ const tmp>& tsu
)
{
operator-=(tsu());
@@ -899,7 +863,7 @@ void faMatrix::operator-=
template
-void faMatrix::operator+=
+void Foam::faMatrix::operator+=
(
const dimensioned& su
)
@@ -909,7 +873,7 @@ void faMatrix::operator+=
template
-void faMatrix::operator-=
+void Foam::faMatrix::operator-=
(
const dimensioned& su
)
@@ -919,7 +883,7 @@ void faMatrix::operator-=
template
-void faMatrix::operator*=
+void Foam::faMatrix::operator*=
(
const areaScalarField& vsf
)
@@ -937,7 +901,7 @@ void faMatrix::operator*=
if (faceFluxCorrectionPtr_)
{
- FatalErrorIn("faMatrix::operator*=(const tmp&)")
+ FatalErrorInFunction
<< "cannot scale a matrix containing a faceFluxCorrection"
<< abort(FatalError);
}
@@ -945,7 +909,7 @@ void faMatrix::operator*=
template
-void faMatrix::operator*=
+void Foam::faMatrix::operator*=
(
const tmp& tvsf
)
@@ -956,7 +920,7 @@ void faMatrix::operator*=
template
-void faMatrix::operator*=
+void Foam::faMatrix::operator*=
(
const dimensioned& ds
)
@@ -977,7 +941,7 @@ void faMatrix::operator*=
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
template
-void checkMethod
+void Foam::checkMethod
(
const faMatrix& fam1,
const faMatrix& fam2,
@@ -986,10 +950,8 @@ void checkMethod
{
if (&fam1.psi() != &fam2.psi())
{
- FatalErrorIn
- (
- "checkMethod(const faMatrix&, const faMatrix