Commit fb871828 authored by Henry Weller's avatar Henry Weller
Browse files

fvPatchFields, fvsPatchFields, pointPatchFields: specifically declare namespace of functions

It is better to declare the namespace of each function in the C file
rather than "open" the namespace as this may lead to inconsistencies
between the declaration in the H files and definition in the C file.
parent 4aa6052a
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -26,15 +26,10 @@ License
#include "mixedFixedValueSlipFvPatchField.H"
#include "symmTransformField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF
......@@ -47,36 +42,36 @@ mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
template<class Type>
mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
(
const mixedFixedValueSlipFvPatchField<Type>& ptf,
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const fvPatchFieldMapper& mapper
const dictionary& dict
)
:
transformFvPatchField<Type>(ptf, p, iF, mapper),
refValue_(ptf.refValue_, mapper),
valueFraction_(ptf.valueFraction_, mapper)
transformFvPatchField<Type>(p, iF),
refValue_("refValue", dict, p.size()),
valueFraction_("valueFraction", dict, p.size())
{}
template<class Type>
mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
(
const mixedFixedValueSlipFvPatchField<Type>& ptf,
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const dictionary& dict
const fvPatchFieldMapper& mapper
)
:
transformFvPatchField<Type>(p, iF),
refValue_("refValue", dict, p.size()),
valueFraction_("valueFraction", dict, p.size())
transformFvPatchField<Type>(ptf, p, iF, mapper),
refValue_(ptf.refValue_, mapper),
valueFraction_(ptf.valueFraction_, mapper)
{}
template<class Type>
mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
(
const mixedFixedValueSlipFvPatchField<Type>& ptf
)
......@@ -86,8 +81,9 @@ mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
valueFraction_(ptf.valueFraction_)
{}
template<class Type>
mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
(
const mixedFixedValueSlipFvPatchField<Type>& ptf,
const DimensionedField<Type, volMesh>& iF
......@@ -101,9 +97,8 @@ mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// Map from self
template<class Type>
void mixedFixedValueSlipFvPatchField<Type>::autoMap
void Foam::mixedFixedValueSlipFvPatchField<Type>::autoMap
(
const fvPatchFieldMapper& m
)
......@@ -114,9 +109,8 @@ void mixedFixedValueSlipFvPatchField<Type>::autoMap
}
// Reverse-map the given fvPatchField onto this fvPatchField
template<class Type>
void mixedFixedValueSlipFvPatchField<Type>::rmap
void Foam::mixedFixedValueSlipFvPatchField<Type>::rmap
(
const fvPatchField<Type>& ptf,
const labelList& addr
......@@ -132,9 +126,9 @@ void mixedFixedValueSlipFvPatchField<Type>::rmap
}
// Return gradient at boundary
template<class Type>
tmp<Field<Type> > mixedFixedValueSlipFvPatchField<Type>::snGrad() const
Foam::tmp<Foam::Field<Type> >
Foam::mixedFixedValueSlipFvPatchField<Type>::snGrad() const
{
tmp<vectorField> nHat = this->patch().nf();
Field<Type> pif(this->patchInternalField());
......@@ -147,9 +141,11 @@ tmp<Field<Type> > mixedFixedValueSlipFvPatchField<Type>::snGrad() const
}
// Evaluate the field on the patch
template<class Type>
void mixedFixedValueSlipFvPatchField<Type>::evaluate(const Pstream::commsTypes)
void Foam::mixedFixedValueSlipFvPatchField<Type>::evaluate
(
const Pstream::commsTypes
)
{
if (!this->updated())
{
......@@ -170,10 +166,9 @@ void mixedFixedValueSlipFvPatchField<Type>::evaluate(const Pstream::commsTypes)
}
// Return defining fields
template<class Type>
tmp<Field<Type> >
mixedFixedValueSlipFvPatchField<Type>::snGradTransformDiag() const
Foam::tmp<Foam::Field<Type> >
Foam::mixedFixedValueSlipFvPatchField<Type>::snGradTransformDiag() const
{
vectorField nHat(this->patch().nf());
vectorField diag(nHat.size());
......@@ -189,9 +184,8 @@ mixedFixedValueSlipFvPatchField<Type>::snGradTransformDiag() const
}
// Write
template<class Type>
void mixedFixedValueSlipFvPatchField<Type>::write(Ostream& os) const
void Foam::mixedFixedValueSlipFvPatchField<Type>::write(Ostream& os) const
{
transformFvPatchField<Type>::write(os);
refValue_.writeEntry("refValue", os);
......@@ -199,8 +193,4 @@ void mixedFixedValueSlipFvPatchField<Type>::write(Ostream& os) const
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -27,11 +27,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
template<class Type>
const word& pointPatchField<Type>::calculatedType()
const Foam::word& Foam::pointPatchField<Type>::calculatedType()
{
return calculatedPointPatchField<Type>::typeName;
}
......@@ -40,7 +37,7 @@ const word& pointPatchField<Type>::calculatedType()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
calculatedPointPatchField<Type>::calculatedPointPatchField
Foam::calculatedPointPatchField<Type>::calculatedPointPatchField
(
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF
......@@ -51,7 +48,7 @@ calculatedPointPatchField<Type>::calculatedPointPatchField
template<class Type>
calculatedPointPatchField<Type>::calculatedPointPatchField
Foam::calculatedPointPatchField<Type>::calculatedPointPatchField
(
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF,
......@@ -63,7 +60,7 @@ calculatedPointPatchField<Type>::calculatedPointPatchField
template<class Type>
calculatedPointPatchField<Type>::calculatedPointPatchField
Foam::calculatedPointPatchField<Type>::calculatedPointPatchField
(
const calculatedPointPatchField<Type>& ptf,
const pointPatch& p,
......@@ -76,7 +73,7 @@ calculatedPointPatchField<Type>::calculatedPointPatchField
template<class Type>
calculatedPointPatchField<Type>::calculatedPointPatchField
Foam::calculatedPointPatchField<Type>::calculatedPointPatchField
(
const calculatedPointPatchField<Type>& ptf,
const DimensionedField<Type, pointMesh>& iF
......@@ -88,8 +85,8 @@ calculatedPointPatchField<Type>::calculatedPointPatchField
template<class Type>
template<class Type2>
autoPtr<pointPatchField<Type> >
pointPatchField<Type>::NewCalculatedType
Foam::autoPtr<Foam::pointPatchField<Type> >
Foam::pointPatchField<Type>::NewCalculatedType
(
const pointPatchField<Type2>& pf
)
......@@ -122,8 +119,4 @@ pointPatchField<Type>::NewCalculatedType
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -25,15 +25,10 @@ License
#include "coupledPointPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
template<class Type>
coupledPointPatchField<Type>::coupledPointPatchField
Foam::coupledPointPatchField<Type>::coupledPointPatchField
(
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF
......@@ -44,7 +39,7 @@ coupledPointPatchField<Type>::coupledPointPatchField
template<class Type>
coupledPointPatchField<Type>::coupledPointPatchField
Foam::coupledPointPatchField<Type>::coupledPointPatchField
(
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF,
......@@ -56,7 +51,7 @@ coupledPointPatchField<Type>::coupledPointPatchField
template<class Type>
coupledPointPatchField<Type>::coupledPointPatchField
Foam::coupledPointPatchField<Type>::coupledPointPatchField
(
const coupledPointPatchField<Type>& ptf,
const pointPatch& p,
......@@ -69,7 +64,7 @@ coupledPointPatchField<Type>::coupledPointPatchField
template<class Type>
coupledPointPatchField<Type>::coupledPointPatchField
Foam::coupledPointPatchField<Type>::coupledPointPatchField
(
const coupledPointPatchField<Type>& ptf,
const DimensionedField<Type, pointMesh>& iF
......@@ -79,8 +74,4 @@ coupledPointPatchField<Type>::coupledPointPatchField
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -26,15 +26,10 @@ License
#include "fixedValuePointPatchField.H"
#include "boolList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
fixedValuePointPatchField<Type>::fixedValuePointPatchField
Foam::fixedValuePointPatchField<Type>::fixedValuePointPatchField
(
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF
......@@ -45,7 +40,7 @@ fixedValuePointPatchField<Type>::fixedValuePointPatchField
template<class Type>
fixedValuePointPatchField<Type>::fixedValuePointPatchField
Foam::fixedValuePointPatchField<Type>::fixedValuePointPatchField
(
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF,
......@@ -58,7 +53,7 @@ fixedValuePointPatchField<Type>::fixedValuePointPatchField
template<class Type>
fixedValuePointPatchField<Type>::fixedValuePointPatchField
Foam::fixedValuePointPatchField<Type>::fixedValuePointPatchField
(
const fixedValuePointPatchField<Type>& ptf,
const pointPatch& p,
......@@ -71,7 +66,7 @@ fixedValuePointPatchField<Type>::fixedValuePointPatchField
template<class Type>
fixedValuePointPatchField<Type>::fixedValuePointPatchField
Foam::fixedValuePointPatchField<Type>::fixedValuePointPatchField
(
const fixedValuePointPatchField<Type>& ptf,
const DimensionedField<Type, pointMesh>& iF
......@@ -81,8 +76,4 @@ fixedValuePointPatchField<Type>::fixedValuePointPatchField
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -25,15 +25,10 @@ License
#include "zeroGradientPointPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
Foam::zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
(
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF
......@@ -44,7 +39,7 @@ zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
template<class Type>
zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
Foam::zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
(
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF,
......@@ -56,7 +51,7 @@ zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
template<class Type>
zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
Foam::zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
(
const zeroGradientPointPatchField<Type>& ptf,
const pointPatch& p,
......@@ -69,7 +64,7 @@ zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
template<class Type>
zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
Foam::zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
(
const zeroGradientPointPatchField<Type>& ptf,
const DimensionedField<Type, pointMesh>& iF
......@@ -79,8 +74,4 @@ zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //
......@@ -25,15 +25,10 @@ License
#include "emptyPointPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
emptyPointPatchField<Type>::emptyPointPatchField
Foam::emptyPointPatchField<Type>::emptyPointPatchField
(
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF
......@@ -44,7 +39,7 @@ emptyPointPatchField<Type>::emptyPointPatchField
template<class Type>
emptyPointPatchField<Type>::emptyPointPatchField
Foam::emptyPointPatchField<Type>::emptyPointPatchField
(
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF,
......@@ -66,7 +61,7 @@ emptyPointPatchField<Type>::emptyPointPatchField
template<class Type>
emptyPointPatchField<Type>::emptyPointPatchField
Foam::emptyPointPatchField<Type>::emptyPointPatchField
(
const emptyPointPatchField<Type>& ptf,
const pointPatch& p,
......@@ -89,7 +84,7 @@ emptyPointPatchField<Type>::emptyPointPatchField
template<class Type>
emptyPointPatchField<Type>::emptyPointPatchField
Foam::emptyPointPatchField<Type>::emptyPointPatchField
(
const emptyPointPatchField<Type>& ptf,
const DimensionedField<Type, pointMesh>& iF
......@@ -99,8 +94,4 @@ emptyPointPatchField<Type>::emptyPointPatchField
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -26,15 +26,10 @@ License
#include "processorPointPatchField.H"
#include "processorPolyPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
processorPointPatchField<Type>::processorPointPatchField
Foam::processorPointPatchField<Type>::processorPointPatchField
(
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF
......@@ -46,7 +41,7 @@ processorPointPatchField<Type>::processorPointPatchField
template<class Type>
processorPointPatchField<Type>::processorPointPatchField
Foam::processorPointPatchField<Type>::processorPointPatchField
(
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF,
......@@ -59,7 +54,7 @@ processorPointPatchField<Type>::processorPointPatchField
template<class Type>
processorPointPatchField<Type>::processorPointPatchField
Foam::processorPointPatchField<Type>::processorPointPatchField
(
const processorPointPatchField<Type>& ptf,
const pointPatch& p,
......@@ -73,7 +68,7 @@ processorPointPatchField<Type>::processorPointPatchField
template<class Type>
processorPointPatchField<Type>::processorPointPatchField
Foam::processorPointPatchField<Type>::processorPointPatchField
(
const processorPointPatchField<Type>& ptf,
const DimensionedField<Type, pointMesh>& iF
......@@ -87,12 +82,8 @@ processorPointPatchField<Type>::processorPointPatchField
// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
template<class Type>
processorPointPatchField<Type>::~processorPointPatchField()
Foam::processorPointPatchField<Type>::~processorPointPatchField()
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //
......@@ -25,15 +25,10 @@ License
#include "symmetryPointPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
symmetryPointPatchField<Type>::symmetryPointPatchField
Foam::symmetryPointPatchField<Type>::symmetryPointPatchField
(
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF
......@@ -44,7 +39,7 @@ symmetryPointPatchField<Type>::symmetryPointPatchField
template<class Type>
symmetryPointPatchField<Type>::symmetryPointPatchField
Foam::symmetryPointPatchField<Type>::symmetryPointPatchField
(
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF,
......@@ -66,7 +61,7 @@ symmetryPointPatchField<Type>::symmetryPointPatchField
template<class Type>
symmetryPointPatchField<Type>::symmetryPointPatchField
Foam::symmetryPointPatchField<Type>::symmetryPointPatchField
(
const symmetryPointPatchField<Type>& ptf,
const pointPatch& p,
......@@ -89,7 +84,7 @@ symmetryPointPatchField<Type>::symmetryPointPatchField
template<class Type>
symmetryPointPatchField<Type>::symmetryPointPatchField
Foam::symmetryPointPatchField<Type>::symmetryPointPatchField
(
const symmetryPointPatchField<Type>& ptf,
const DimensionedField<Type, pointMesh>& iF
......@@ -99,8 +94,4 @@ symmetryPointPatchField<Type>::symmetryPointPatchField
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //
......@@ -25,15 +25,10 @@ License
#include "symmetryPlanePointPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam