Merge branch 'master' of ssh://noisy/home/noisy2/OpenFOAM/OpenFOAM-dev

This commit is contained in:
andy
2008-06-18 10:22:51 +01:00
46 changed files with 126 additions and 145 deletions

View File

@ -30,29 +30,24 @@ License
#include "PtrListLoopM.H"
#include "SLPtrList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
template<class T>
PtrList<T>::PtrList()
Foam::PtrList<T>::PtrList()
:
ptrs_()
{}
template<class T>
PtrList<T>::PtrList(const label s)
Foam::PtrList<T>::PtrList(const label s)
:
ptrs_(s, reinterpret_cast<T*>(NULL))
{}
template<class T>
PtrList<T>::PtrList(const PtrList<T>& a)
Foam::PtrList<T>::PtrList(const PtrList<T>& a)
:
ptrs_(a.size())
{
@ -65,7 +60,7 @@ PtrList<T>::PtrList(const PtrList<T>& a)
template<class T>
template<class CloneArg>
PtrList<T>::PtrList(const PtrList<T>& a, const CloneArg& cloneArg)
Foam::PtrList<T>::PtrList(const PtrList<T>& a, const CloneArg& cloneArg)
:
ptrs_(a.size())
{
@ -77,7 +72,7 @@ PtrList<T>::PtrList(const PtrList<T>& a, const CloneArg& cloneArg)
template<class T>
PtrList<T>::PtrList(PtrList<T>& a, bool reUse)
Foam::PtrList<T>::PtrList(PtrList<T>& a, bool reUse)
:
ptrs_(a.size())
{
@ -101,7 +96,7 @@ PtrList<T>::PtrList(PtrList<T>& a, bool reUse)
template<class T>
PtrList<T>::PtrList(const SLPtrList<T>& sll)
Foam::PtrList<T>::PtrList(const SLPtrList<T>& sll)
:
ptrs_(sll.size())
{
@ -124,7 +119,7 @@ PtrList<T>::PtrList(const SLPtrList<T>& sll)
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
template<class T>
PtrList<T>::~PtrList()
Foam::PtrList<T>::~PtrList()
{
forAll(*this, i)
{
@ -139,8 +134,15 @@ PtrList<T>::~PtrList()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class T>
void PtrList<T>::setSize(const label newSize)
void Foam::PtrList<T>::setSize(const label newSize)
{
if (newSize < 0)
{
FatalErrorIn("PtrList<T>::setSize(const label)")
<< "bad set size " << newSize
<< abort(FatalError);
}
label oldSize = size();
if (newSize == 0)
@ -160,7 +162,7 @@ void PtrList<T>::setSize(const label newSize)
ptrs_.setSize(newSize);
}
else if (newSize > oldSize)
else // newSize > oldSize
{
ptrs_.setSize(newSize);
@ -174,7 +176,7 @@ void PtrList<T>::setSize(const label newSize)
template<class T>
void PtrList<T>::clear()
void Foam::PtrList<T>::clear()
{
forAll(*this, i)
{
@ -189,7 +191,7 @@ void PtrList<T>::clear()
template<class T>
void PtrList<T>::transfer(PtrList<T>& a)
void Foam::PtrList<T>::transfer(PtrList<T>& a)
{
clear();
ptrs_.transfer(a.ptrs_);
@ -197,7 +199,7 @@ void PtrList<T>::transfer(PtrList<T>& a)
template<class T>
void PtrList<T>::reorder(const UList<label>& oldToNew)
void Foam::PtrList<T>::reorder(const UList<label>& oldToNew)
{
if (oldToNew.size() != size())
{
@ -247,7 +249,7 @@ void PtrList<T>::reorder(const UList<label>& oldToNew)
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class T>
PtrList<T>& PtrList<T>::operator=(const PtrList<T>& a)
Foam::PtrList<T>& Foam::PtrList<T>::operator=(const PtrList<T>& a)
{
if (this == &a)
{
@ -284,10 +286,6 @@ PtrList<T>& PtrList<T>::operator=(const PtrList<T>& a)
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "PtrListIO.C"

View File

@ -124,7 +124,7 @@ public:
//- Update the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);
};

View File

@ -117,7 +117,7 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
) = 0;
//- Initialise swap of patch point values

View File

@ -183,7 +183,7 @@ public:
//- Update the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);

View File

@ -163,7 +163,7 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);

View File

@ -154,7 +154,7 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
)
{}

View File

@ -165,7 +165,7 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
)
{}

View File

@ -128,7 +128,7 @@ public:
//- Update the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);
};

View File

@ -140,7 +140,7 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
)
{}

View File

@ -353,14 +353,14 @@ public:
//- Initialise evaluation of the patch field (do nothing)
virtual void initEvaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
)
{}
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);

View File

@ -85,7 +85,7 @@ void Foam::fvMeshDistribute::addPatchFields(const word& patchFieldType)
);
label sz = bfld.size();
bfld.setSize(sz+1);
bfld.setSize(sz + 1);
bfld.set
(
sz,
@ -124,10 +124,8 @@ void Foam::fvMeshDistribute::deleteTrailingPatchFields()
fld.boundaryField()
);
label sz = bfld.size();
// Shrink patchFields
bfld.setSize(sz-1);
bfld.setSize(bfld.size() - 1);
}
}

View File

@ -131,7 +131,7 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Return face-gradient transform diagonal

View File

@ -196,7 +196,7 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Return face-gradient transform diagonal

View File

@ -168,7 +168,7 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Return the matrix diagonal coefficients corresponding to the

View File

@ -201,7 +201,7 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Return the matrix diagonal coefficients corresponding to the

View File

@ -163,14 +163,14 @@ public:
//- Initialise the evaluation of the patch field
virtual void initEvaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
)
{}
//- Evaluate the patch field, sets Updated to false
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
)
{}

View File

@ -137,7 +137,7 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Return the matrix diagonal coefficients corresponding to the

View File

@ -131,7 +131,7 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Return face-gradient transform diagonal

View File

@ -202,7 +202,7 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Return the matrix diagonal coefficients corresponding to the

View File

@ -165,7 +165,7 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Return face-gradient transform diagonal

View File

@ -127,7 +127,7 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);

View File

@ -164,7 +164,7 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Return face-gradient transform diagonal

View File

@ -349,14 +349,14 @@ public:
//- Initialise the evaluation of the patch field
virtual void initEvaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
)
{}
//- Evaluate the patch field, sets Updated to false
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);

View File

@ -196,7 +196,7 @@ public:
const triSurfaceMeshes& surfaces() const;
//- Mode of projection/following
const followMode projectMode() const
followMode projectMode() const
{
return projectMode_;
}
@ -223,7 +223,7 @@ public:
//- Update the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Write

View File

@ -123,7 +123,7 @@ public:
// Access
inline const label averagesTaken() const;
inline label averagesTaken() const;
inline label nBuffers() const;

View File

@ -46,7 +46,7 @@ inline const Field<Type>& bufferedAccumulator<Type>::accumulationBuffer() const
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
inline const label bufferedAccumulator<Type>::averagesTaken() const
inline label bufferedAccumulator<Type>::averagesTaken() const
{
return averagesTaken_;
}

View File

@ -141,13 +141,13 @@ public:
inline const Field< Field<Type> >& tZeroBuffers() const;
inline const scalar duration() const;
inline scalar duration() const;
inline const scalar sampleInterval() const;
inline scalar sampleInterval() const;
inline const scalar averagingInterval() const;
inline scalar averagingInterval() const;
inline const label sampleSteps() const;
inline label sampleSteps() const;
inline label measurandFieldSize() const;

View File

@ -33,28 +33,28 @@ tZeroBuffers() const
template<class Type>
inline const scalar Foam::correlationFunction<Type>::duration() const
inline scalar Foam::correlationFunction<Type>::duration() const
{
return duration_;
}
template<class Type>
inline const scalar Foam::correlationFunction<Type>::sampleInterval() const
inline scalar Foam::correlationFunction<Type>::sampleInterval() const
{
return sampleInterval_;
}
template<class Type>
inline const scalar Foam::correlationFunction<Type>::averagingInterval() const
inline scalar Foam::correlationFunction<Type>::averagingInterval() const
{
return averagingInterval_;
}
template<class Type>
inline const label Foam::correlationFunction<Type>::sampleSteps() const
inline label Foam::correlationFunction<Type>::sampleSteps() const
{
return sampleSteps_;
}

View File

@ -94,17 +94,17 @@ public:
void insertMissingKeys();
List< Pair<scalar> > normalised();
List<Pair<scalar> > normalised();
List< Pair<scalar> > normalisedMinusMean();
List<Pair<scalar> > normalisedMinusMean();
List< Pair<scalar> > normalisedShifted(const scalar shiftValue);
List<Pair<scalar> > normalisedShifted(const scalar shiftValue);
List< Pair<scalar> > raw();
List<Pair<scalar> > raw();
// Access
inline const scalar binWidth() const;
inline scalar binWidth() const;
// Member Operators

View File

@ -24,19 +24,12 @@ License
\*---------------------------------------------------------------------------*/
namespace Foam
{
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline const scalar distribution::binWidth() const
inline Foam::scalar Foam::distribution::binWidth() const
{
return binWidth_;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -166,10 +166,10 @@ public:
// Access
//- Return id
inline const label id() const;
inline label id() const;
//- Return mass
inline const scalar mass() const;
inline scalar mass() const;
//- Return velocity
inline const vector& U() const;
@ -180,7 +180,7 @@ public:
inline vector& A();
//- Return potential energy
inline const scalar potentialEnergy() const;
inline scalar potentialEnergy() const;
inline scalar& potentialEnergy();
//- Return stress contribution
@ -188,7 +188,7 @@ public:
inline tensor& rf();
//- Return tethered
inline const label tethered() const;
inline label tethered() const;
//- Return tetherPosition
inline const vector& tetherPosition() const;

View File

@ -24,12 +24,9 @@ License
\*---------------------------------------------------------------------------*/
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
inline molecule::molecule
inline Foam::molecule::molecule
(
const Cloud<molecule>& c,
const vector& position,
@ -54,7 +51,7 @@ inline molecule::molecule
{}
inline molecule::trackData::trackData
inline Foam::molecule::trackData::trackData
(
moleculeCloud& molCloud,
label part
@ -68,92 +65,88 @@ inline molecule::trackData::trackData
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline const label molecule::id() const
inline Foam::label Foam::molecule::id() const
{
return id_;
}
inline const scalar molecule::mass() const
inline Foam::scalar Foam::molecule::mass() const
{
return mass_;
}
inline const vector& molecule::U() const
inline const Foam::vector& Foam::molecule::U() const
{
return U_;
}
inline vector& molecule::U()
inline Foam::vector& Foam::molecule::U()
{
return U_;
}
inline const vector& molecule::A() const
inline const Foam::vector& Foam::molecule::A() const
{
return A_;
}
inline vector& molecule::A()
inline Foam::vector& Foam::molecule::A()
{
return A_;
}
inline const scalar molecule::potentialEnergy() const
inline Foam::scalar Foam::molecule::potentialEnergy() const
{
return potentialEnergy_;
}
inline scalar& molecule::potentialEnergy()
inline Foam::scalar& Foam::molecule::potentialEnergy()
{
return potentialEnergy_;
}
inline const tensor& molecule::rf() const
inline const Foam::tensor& Foam::molecule::rf() const
{
return rf_;
}
inline tensor& molecule::rf()
inline Foam::tensor& Foam::molecule::rf()
{
return rf_;
}
inline const label molecule::tethered() const
inline Foam::label Foam::molecule::tethered() const
{
return tethered_;
}
inline const vector& molecule::tetherPosition() const
inline const Foam::vector& Foam::molecule::tetherPosition() const
{
return tetherPosition_;
}
inline moleculeCloud& molecule::trackData::molCloud()
inline Foam::moleculeCloud& Foam::molecule::trackData::molCloud()
{
return molCloud_;
}
inline label molecule::trackData::part() const
inline Foam::label Foam::molecule::trackData::part() const
{
return part_;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -191,9 +191,9 @@ public:
inline scalar guardRadius() const;
inline const scalar rCutMax() const;
inline scalar rCutMax() const;
inline const scalar rCutMaxSqr() const;
inline scalar rCutMaxSqr() const;
inline const List<word>& idList() const;

View File

@ -56,13 +56,13 @@ inline scalar moleculeCloud::guardRadius() const
}
inline const scalar moleculeCloud::rCutMax() const
inline scalar moleculeCloud::rCutMax() const
{
return rCutMax_;
}
inline const scalar moleculeCloud::rCutMaxSqr() const
inline scalar moleculeCloud::rCutMaxSqr() const
{
return rCutMaxSqr_;
}

View File

@ -124,21 +124,21 @@ public:
// Access
inline const scalar m() const;
inline scalar m() const;
inline const scalar gamma() const ;
inline scalar gamma() const ;
inline const scalar rm() const;
inline scalar rm() const;
inline const scalar epsilon() const;
inline scalar epsilon() const;
inline const scalar rCut() const;
inline scalar rCut() const;
inline const scalar rCutSqr() const;
inline scalar rCutSqr() const;
inline const scalar rMin() const;
inline scalar rMin() const;
inline const scalar dr() const;
inline scalar dr() const;
// Write

View File

@ -24,49 +24,49 @@ License
\*---------------------------------------------------------------------------*/
inline const Foam::scalar Foam::pairPotential::m() const
inline Foam::scalar Foam::pairPotential::m() const
{
return m_;
}
inline const Foam::scalar Foam::pairPotential::gamma() const
inline Foam::scalar Foam::pairPotential::gamma() const
{
return gamma_;
}
inline const Foam::scalar Foam::pairPotential::rm() const
inline Foam::scalar Foam::pairPotential::rm() const
{
return rm_;
}
inline const Foam::scalar Foam::pairPotential::epsilon() const
inline Foam::scalar Foam::pairPotential::epsilon() const
{
return epsilon_;
}
inline const Foam::scalar Foam::pairPotential::rCut() const
inline Foam::scalar Foam::pairPotential::rCut() const
{
return rCut_;
}
inline const Foam::scalar Foam::pairPotential::rCutSqr() const
inline Foam::scalar Foam::pairPotential::rCutSqr() const
{
return rCutSqr_;
}
inline const Foam::scalar Foam::pairPotential::rMin() const
inline Foam::scalar Foam::pairPotential::rMin() const
{
return rMin_;
}
inline const Foam::scalar Foam::pairPotential::dr() const
inline Foam::scalar Foam::pairPotential::dr() const
{
return dr_;
}

View File

@ -127,7 +127,7 @@ bool pairPotentialList::rCutSqr
}
const scalar pairPotentialList::rCutSqr
scalar pairPotentialList::rCutSqr
(
const label a,
const label b
@ -137,7 +137,7 @@ const scalar pairPotentialList::rCutSqr
}
const scalar pairPotentialList::rCut
scalar pairPotentialList::rCut
(
const label a,
const label b

View File

@ -126,13 +126,13 @@ public:
const scalar rIJMagSqr
) const;
const scalar rCutSqr
scalar rCutSqr
(
const label a,
const label b
) const;
const scalar rCut
scalar rCut
(
const label a,
const label b

View File

@ -30,12 +30,10 @@ License
#include "Time.H"
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
#include "incompressible/turbulenceModel/turbulenceModel.H"
#include "incompressible/RASmodel/RASmodel.H"
#include "incompressible/LESmodel/LESmodel.H"
#include "basicThermo.H"
#include "compressible/turbulenceModel/turbulenceModel.H"
#include "compressible/RASmodel/RASmodel.H"
#include "compressible/LESmodel/LESmodel.H"
@ -52,19 +50,20 @@ Foam::tmp<Foam::volSymmTensorField> Foam::forces::devRhoReff() const
{
if
(
obr_.foundObject<compressible::turbulenceModel>("turbulenceProperties")
obr_.foundObject<compressible::RASmodel>("turbulenceProperties")
)
{
const compressible::turbulenceModel& ras
= obr_.lookupObject<compressible::turbulenceModel>
const compressible::RASmodel& ras
= obr_.lookupObject<compressible::RASmodel>
("turbulenceProperties");
return ras.devRhoReff();
}
else if (obr_.foundObject<turbulenceModel>("turbulenceProperties"))
else if (obr_.foundObject<incompressible::RASmodel>("turbulenceProperties"))
{
const turbulenceModel& ras
= obr_.lookupObject<turbulenceModel>("turbulenceProperties");
const incompressible::RASmodel& ras
= obr_.lookupObject<incompressible::RASmodel>
("turbulenceProperties");
return rhoRef_*ras.devReff();
}

View File

@ -141,7 +141,7 @@ public:
//- Evaluate the patchField
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);
};

View File

@ -131,7 +131,7 @@ public:
//- Evaluate the patchField
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);
};

View File

@ -178,7 +178,7 @@ public:
//- Evaluate the patchField
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);

View File

@ -178,7 +178,7 @@ public:
//- Evaluate the patchField
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);

View File

@ -133,7 +133,7 @@ public:
//- Evaluate the patchField
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);
};

View File

@ -133,7 +133,7 @@ public:
//- Evaluate the patchField
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
const Pstream::commsTypes commsType=Pstream::blocking
);
};