STYLE: minor code formatting

This commit is contained in:
andy
2010-11-11 12:30:49 +00:00
parent cb45c789b5
commit 91ac6f9078
9 changed files with 79 additions and 136 deletions

View File

@ -393,8 +393,7 @@ bool Foam::distanceSurface::update()
}
Foam::tmp<Foam::scalarField>
Foam::distanceSurface::sample
Foam::tmp<Foam::scalarField> Foam::distanceSurface::sample
(
const volScalarField& vField
) const
@ -403,8 +402,7 @@ Foam::distanceSurface::sample
}
Foam::tmp<Foam::vectorField>
Foam::distanceSurface::sample
Foam::tmp<Foam::vectorField> Foam::distanceSurface::sample
(
const volVectorField& vField
) const
@ -413,8 +411,7 @@ Foam::distanceSurface::sample
}
Foam::tmp<Foam::sphericalTensorField>
Foam::distanceSurface::sample
Foam::tmp<Foam::sphericalTensorField> Foam::distanceSurface::sample
(
const volSphericalTensorField& vField
) const
@ -423,8 +420,7 @@ Foam::distanceSurface::sample
}
Foam::tmp<Foam::symmTensorField>
Foam::distanceSurface::sample
Foam::tmp<Foam::symmTensorField> Foam::distanceSurface::sample
(
const volSymmTensorField& vField
) const
@ -433,8 +429,7 @@ Foam::distanceSurface::sample
}
Foam::tmp<Foam::tensorField>
Foam::distanceSurface::sample
Foam::tmp<Foam::tensorField> Foam::distanceSurface::sample
(
const volTensorField& vField
) const
@ -443,8 +438,7 @@ Foam::distanceSurface::sample
}
Foam::tmp<Foam::scalarField>
Foam::distanceSurface::interpolate
Foam::tmp<Foam::scalarField> Foam::distanceSurface::interpolate
(
const interpolation<scalar>& interpolator
) const
@ -453,8 +447,7 @@ Foam::distanceSurface::interpolate
}
Foam::tmp<Foam::vectorField>
Foam::distanceSurface::interpolate
Foam::tmp<Foam::vectorField> Foam::distanceSurface::interpolate
(
const interpolation<vector>& interpolator
) const
@ -462,8 +455,7 @@ Foam::distanceSurface::interpolate
return interpolateField(interpolator);
}
Foam::tmp<Foam::sphericalTensorField>
Foam::distanceSurface::interpolate
Foam::tmp<Foam::sphericalTensorField> Foam::distanceSurface::interpolate
(
const interpolation<sphericalTensor>& interpolator
) const
@ -472,8 +464,7 @@ Foam::distanceSurface::interpolate
}
Foam::tmp<Foam::symmTensorField>
Foam::distanceSurface::interpolate
Foam::tmp<Foam::symmTensorField> Foam::distanceSurface::interpolate
(
const interpolation<symmTensor>& interpolator
) const
@ -482,8 +473,7 @@ Foam::distanceSurface::interpolate
}
Foam::tmp<Foam::tensorField>
Foam::distanceSurface::interpolate
Foam::tmp<Foam::tensorField> Foam::distanceSurface::interpolate
(
const interpolation<tensor>& interpolator
) const

View File

@ -162,8 +162,7 @@ void Foam::sampledPatch::remapFaces
Foam::tmp<Foam::scalarField>
Foam::sampledPatch::sample
Foam::tmp<Foam::scalarField> Foam::sampledPatch::sample
(
const volScalarField& vField
) const
@ -172,8 +171,7 @@ Foam::sampledPatch::sample
}
Foam::tmp<Foam::vectorField>
Foam::sampledPatch::sample
Foam::tmp<Foam::vectorField> Foam::sampledPatch::sample
(
const volVectorField& vField
) const
@ -181,8 +179,7 @@ Foam::sampledPatch::sample
return sampleField(vField);
}
Foam::tmp<Foam::sphericalTensorField>
Foam::sampledPatch::sample
Foam::tmp<Foam::sphericalTensorField> Foam::sampledPatch::sample
(
const volSphericalTensorField& vField
) const
@ -191,8 +188,7 @@ Foam::sampledPatch::sample
}
Foam::tmp<Foam::symmTensorField>
Foam::sampledPatch::sample
Foam::tmp<Foam::symmTensorField> Foam::sampledPatch::sample
(
const volSymmTensorField& vField
) const
@ -201,8 +197,7 @@ Foam::sampledPatch::sample
}
Foam::tmp<Foam::tensorField>
Foam::sampledPatch::sample
Foam::tmp<Foam::tensorField> Foam::sampledPatch::sample
(
const volTensorField& vField
) const
@ -211,8 +206,7 @@ Foam::sampledPatch::sample
}
Foam::tmp<Foam::scalarField>
Foam::sampledPatch::interpolate
Foam::tmp<Foam::scalarField> Foam::sampledPatch::interpolate
(
const interpolation<scalar>& interpolator
) const
@ -221,8 +215,7 @@ Foam::sampledPatch::interpolate
}
Foam::tmp<Foam::vectorField>
Foam::sampledPatch::interpolate
Foam::tmp<Foam::vectorField> Foam::sampledPatch::interpolate
(
const interpolation<vector>& interpolator
) const
@ -230,8 +223,7 @@ Foam::sampledPatch::interpolate
return interpolateField(interpolator);
}
Foam::tmp<Foam::sphericalTensorField>
Foam::sampledPatch::interpolate
Foam::tmp<Foam::sphericalTensorField> Foam::sampledPatch::interpolate
(
const interpolation<sphericalTensor>& interpolator
) const
@ -240,8 +232,7 @@ Foam::sampledPatch::interpolate
}
Foam::tmp<Foam::symmTensorField>
Foam::sampledPatch::interpolate
Foam::tmp<Foam::symmTensorField> Foam::sampledPatch::interpolate
(
const interpolation<symmTensor>& interpolator
) const
@ -250,8 +241,7 @@ Foam::sampledPatch::interpolate
}
Foam::tmp<Foam::tensorField>
Foam::sampledPatch::interpolate
Foam::tmp<Foam::tensorField> Foam::sampledPatch::interpolate
(
const interpolation<tensor>& interpolator
) const

View File

@ -156,8 +156,7 @@ bool Foam::sampledPlane::update()
}
Foam::tmp<Foam::scalarField>
Foam::sampledPlane::sample
Foam::tmp<Foam::scalarField> Foam::sampledPlane::sample
(
const volScalarField& vField
) const
@ -166,8 +165,7 @@ Foam::sampledPlane::sample
}
Foam::tmp<Foam::vectorField>
Foam::sampledPlane::sample
Foam::tmp<Foam::vectorField> Foam::sampledPlane::sample
(
const volVectorField& vField
) const
@ -176,8 +174,7 @@ Foam::sampledPlane::sample
}
Foam::tmp<Foam::sphericalTensorField>
Foam::sampledPlane::sample
Foam::tmp<Foam::sphericalTensorField> Foam::sampledPlane::sample
(
const volSphericalTensorField& vField
) const
@ -186,8 +183,7 @@ Foam::sampledPlane::sample
}
Foam::tmp<Foam::symmTensorField>
Foam::sampledPlane::sample
Foam::tmp<Foam::symmTensorField> Foam::sampledPlane::sample
(
const volSymmTensorField& vField
) const
@ -196,8 +192,7 @@ Foam::sampledPlane::sample
}
Foam::tmp<Foam::tensorField>
Foam::sampledPlane::sample
Foam::tmp<Foam::tensorField> Foam::sampledPlane::sample
(
const volTensorField& vField
) const
@ -206,8 +201,7 @@ Foam::sampledPlane::sample
}
Foam::tmp<Foam::scalarField>
Foam::sampledPlane::interpolate
Foam::tmp<Foam::scalarField> Foam::sampledPlane::interpolate
(
const interpolation<scalar>& interpolator
) const
@ -216,8 +210,7 @@ Foam::sampledPlane::interpolate
}
Foam::tmp<Foam::vectorField>
Foam::sampledPlane::interpolate
Foam::tmp<Foam::vectorField> Foam::sampledPlane::interpolate
(
const interpolation<vector>& interpolator
) const
@ -225,8 +218,7 @@ Foam::sampledPlane::interpolate
return interpolateField(interpolator);
}
Foam::tmp<Foam::sphericalTensorField>
Foam::sampledPlane::interpolate
Foam::tmp<Foam::sphericalTensorField> Foam::sampledPlane::interpolate
(
const interpolation<sphericalTensor>& interpolator
) const
@ -235,8 +227,7 @@ Foam::sampledPlane::interpolate
}
Foam::tmp<Foam::symmTensorField>
Foam::sampledPlane::interpolate
Foam::tmp<Foam::symmTensorField> Foam::sampledPlane::interpolate
(
const interpolation<symmTensor>& interpolator
) const
@ -245,8 +236,7 @@ Foam::sampledPlane::interpolate
}
Foam::tmp<Foam::tensorField>
Foam::sampledPlane::interpolate
Foam::tmp<Foam::tensorField> Foam::sampledPlane::interpolate
(
const interpolation<tensor>& interpolator
) const

View File

@ -191,6 +191,7 @@ Foam::sampledSurface::~sampledSurface()
clearGeom();
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const Foam::vectorField& Foam::sampledSurface::Sf() const
@ -238,7 +239,6 @@ Foam::scalar Foam::sampledSurface::area() const
}
// do not project scalar - just copy values
Foam::tmp<Foam::Field<Foam::scalar> >
Foam::sampledSurface::project(const Field<scalar>& field) const
{
@ -295,6 +295,7 @@ void Foam::sampledSurface::print(Ostream& os) const
os << type();
}
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
Foam::Ostream& Foam::operator<<(Ostream &os, const sampledSurface& s)
@ -304,4 +305,5 @@ Foam::Ostream& Foam::operator<<(Ostream &os, const sampledSurface& s)
return os;
}
// ************************************************************************* //

View File

@ -98,6 +98,7 @@ class sampledSurface
//- Total surface area
mutable scalar area_;
// Make geometric data
//- Make Sf
@ -109,6 +110,7 @@ class sampledSurface
//- Make Cf
void makeCf() const;
// Service methods
//- Check field size matches surface size
@ -135,34 +137,37 @@ class sampledSurface
template<class ReturnType, class Type>
tmp<Field<ReturnType> > project(const tmp<Field<Type> >&) const;
protected:
// Protected Member functions
virtual void clearGeom() const;
public:
//- Runtime type information
TypeName("sampledSurface");
TypeName("sampledSurface");
// Declare run-time constructor selection table
declareRunTimeSelectionTable
//- Declare run-time constructor selection table
declareRunTimeSelectionTable
(
autoPtr,
sampledSurface,
word,
(
autoPtr,
sampledSurface,
word,
(
const word& name,
const polyMesh& mesh,
const dictionary& dict
),
(name, mesh, dict)
);
const word& name,
const polyMesh& mesh,
const dictionary& dict
),
(name, mesh, dict)
);
// iNew helper class
//- Class used for the PtrLists read-construction
class iNew
{
@ -260,7 +265,6 @@ public:
// Do nothing (and return false) if no update was required
virtual bool update() = 0;
//- Points of surface
virtual const pointField& points() const = 0;
@ -394,9 +398,7 @@ public:
//- Write
virtual void print(Ostream&) const;
// IOstream operators
//- Ostream operator
friend Ostream& operator<<(Ostream&, const sampledSurface&);
};

View File

@ -56,7 +56,7 @@ Type Foam::sampledSurface::integrate(const Field<Type>& field) const
if (checkFieldSize(field))
{
value = sum(field * magSf());
value = sum(field*magSf());
}
reduce(value, sumOp<Type>());
@ -80,7 +80,7 @@ Type Foam::sampledSurface::average(const Field<Type>& field) const
if (checkFieldSize(field))
{
value = sum(field * magSf());
value = sum(field*magSf());
}
reduce(value, sumOp<Type>());
@ -88,7 +88,7 @@ Type Foam::sampledSurface::average(const Field<Type>& field) const
// avoid divide-by-zero
if (area())
{
return value / area();
return value/area();
}
else
{
@ -119,7 +119,7 @@ void Foam::sampledSurface::project
forAll(norm, faceI)
{
res[faceI] = field[faceI] & (norm[faceI] / mag(norm[faceI]));
res[faceI] = field[faceI] & (norm[faceI]/mag(norm[faceI]));
}
}
else
@ -208,5 +208,4 @@ Foam::sampledSurface::pointAverage
}
// ************************************************************************* //

View File

@ -301,8 +301,7 @@ bool Foam::sampledTriSurfaceMesh::update()
}
Foam::tmp<Foam::scalarField>
Foam::sampledTriSurfaceMesh::sample
Foam::tmp<Foam::scalarField> Foam::sampledTriSurfaceMesh::sample
(
const volScalarField& vField
) const
@ -311,8 +310,7 @@ Foam::sampledTriSurfaceMesh::sample
}
Foam::tmp<Foam::vectorField>
Foam::sampledTriSurfaceMesh::sample
Foam::tmp<Foam::vectorField> Foam::sampledTriSurfaceMesh::sample
(
const volVectorField& vField
) const
@ -320,8 +318,7 @@ Foam::sampledTriSurfaceMesh::sample
return sampleField(vField);
}
Foam::tmp<Foam::sphericalTensorField>
Foam::sampledTriSurfaceMesh::sample
Foam::tmp<Foam::sphericalTensorField> Foam::sampledTriSurfaceMesh::sample
(
const volSphericalTensorField& vField
) const
@ -330,8 +327,7 @@ Foam::sampledTriSurfaceMesh::sample
}
Foam::tmp<Foam::symmTensorField>
Foam::sampledTriSurfaceMesh::sample
Foam::tmp<Foam::symmTensorField> Foam::sampledTriSurfaceMesh::sample
(
const volSymmTensorField& vField
) const
@ -340,8 +336,7 @@ Foam::sampledTriSurfaceMesh::sample
}
Foam::tmp<Foam::tensorField>
Foam::sampledTriSurfaceMesh::sample
Foam::tmp<Foam::tensorField> Foam::sampledTriSurfaceMesh::sample
(
const volTensorField& vField
) const
@ -350,8 +345,7 @@ Foam::sampledTriSurfaceMesh::sample
}
Foam::tmp<Foam::scalarField>
Foam::sampledTriSurfaceMesh::interpolate
Foam::tmp<Foam::scalarField> Foam::sampledTriSurfaceMesh::interpolate
(
const interpolation<scalar>& interpolator
) const
@ -360,8 +354,7 @@ Foam::sampledTriSurfaceMesh::interpolate
}
Foam::tmp<Foam::vectorField>
Foam::sampledTriSurfaceMesh::interpolate
Foam::tmp<Foam::vectorField> Foam::sampledTriSurfaceMesh::interpolate
(
const interpolation<vector>& interpolator
) const
@ -369,8 +362,7 @@ Foam::sampledTriSurfaceMesh::interpolate
return interpolateField(interpolator);
}
Foam::tmp<Foam::sphericalTensorField>
Foam::sampledTriSurfaceMesh::interpolate
Foam::tmp<Foam::sphericalTensorField> Foam::sampledTriSurfaceMesh::interpolate
(
const interpolation<sphericalTensor>& interpolator
) const
@ -379,8 +371,7 @@ Foam::sampledTriSurfaceMesh::interpolate
}
Foam::tmp<Foam::symmTensorField>
Foam::sampledTriSurfaceMesh::interpolate
Foam::tmp<Foam::symmTensorField> Foam::sampledTriSurfaceMesh::interpolate
(
const interpolation<symmTensor>& interpolator
) const
@ -389,8 +380,7 @@ Foam::sampledTriSurfaceMesh::interpolate
}
Foam::tmp<Foam::tensorField>
Foam::sampledTriSurfaceMesh::interpolate
Foam::tmp<Foam::tensorField> Foam::sampledTriSurfaceMesh::interpolate
(
const interpolation<tensor>& interpolator
) const

View File

@ -215,8 +215,7 @@ bool Foam::sampledThresholdCellFaces::update()
}
Foam::tmp<Foam::scalarField>
Foam::sampledThresholdCellFaces::sample
Foam::tmp<Foam::scalarField> Foam::sampledThresholdCellFaces::sample
(
const volScalarField& vField
) const
@ -225,8 +224,7 @@ Foam::sampledThresholdCellFaces::sample
}
Foam::tmp<Foam::vectorField>
Foam::sampledThresholdCellFaces::sample
Foam::tmp<Foam::vectorField> Foam::sampledThresholdCellFaces::sample
(
const volVectorField& vField
) const
@ -235,8 +233,7 @@ Foam::sampledThresholdCellFaces::sample
}
Foam::tmp<Foam::sphericalTensorField>
Foam::sampledThresholdCellFaces::sample
Foam::tmp<Foam::sphericalTensorField> Foam::sampledThresholdCellFaces::sample
(
const volSphericalTensorField& vField
) const
@ -245,8 +242,7 @@ Foam::sampledThresholdCellFaces::sample
}
Foam::tmp<Foam::symmTensorField>
Foam::sampledThresholdCellFaces::sample
Foam::tmp<Foam::symmTensorField> Foam::sampledThresholdCellFaces::sample
(
const volSymmTensorField& vField
) const
@ -255,8 +251,7 @@ Foam::sampledThresholdCellFaces::sample
}
Foam::tmp<Foam::tensorField>
Foam::sampledThresholdCellFaces::sample
Foam::tmp<Foam::tensorField> Foam::sampledThresholdCellFaces::sample
(
const volTensorField& vField
) const
@ -265,8 +260,7 @@ Foam::sampledThresholdCellFaces::sample
}
Foam::tmp<Foam::scalarField>
Foam::sampledThresholdCellFaces::interpolate
Foam::tmp<Foam::scalarField> Foam::sampledThresholdCellFaces::interpolate
(
const interpolation<scalar>& interpolator
) const
@ -275,8 +269,7 @@ Foam::sampledThresholdCellFaces::interpolate
}
Foam::tmp<Foam::vectorField>
Foam::sampledThresholdCellFaces::interpolate
Foam::tmp<Foam::vectorField> Foam::sampledThresholdCellFaces::interpolate
(
const interpolation<vector>& interpolator
) const
@ -294,8 +287,7 @@ Foam::sampledThresholdCellFaces::interpolate
}
Foam::tmp<Foam::symmTensorField>
Foam::sampledThresholdCellFaces::interpolate
Foam::tmp<Foam::symmTensorField> Foam::sampledThresholdCellFaces::interpolate
(
const interpolation<symmTensor>& interpolator
) const
@ -304,8 +296,7 @@ Foam::sampledThresholdCellFaces::interpolate
}
Foam::tmp<Foam::tensorField>
Foam::sampledThresholdCellFaces::interpolate
Foam::tmp<Foam::tensorField> Foam::sampledThresholdCellFaces::interpolate
(
const interpolation<tensor>& interpolator
) const

View File

@ -136,7 +136,6 @@ public:
// Do nothing (and return false) if no update was needed
virtual bool update();
//- Points of surface
virtual const pointField& points() const
{
@ -150,16 +149,10 @@ public:
}
//- sample field on surface
virtual tmp<scalarField> sample
(
const volScalarField&
) const;
virtual tmp<scalarField> sample(const volScalarField&) const;
//- sample field on surface
virtual tmp<vectorField> sample
(
const volVectorField&
) const;
virtual tmp<vectorField> sample( const volVectorField&) const;
//- sample field on surface
virtual tmp<sphericalTensorField> sample
@ -168,10 +161,7 @@ public:
) const;
//- sample field on surface
virtual tmp<symmTensorField> sample
(
const volSymmTensorField&
) const;
virtual tmp<symmTensorField> sample(const volSymmTensorField&) const;
//- sample field on surface
virtual tmp<tensorField> sample
@ -179,7 +169,6 @@ public:
const volTensorField&
) const;
//- interpolate field on surface
virtual tmp<scalarField> interpolate
(