ENH: Code formatting updates

This commit is contained in:
andy
2013-11-21 10:00:26 +00:00
parent 1dc64adbdb
commit 3548535111
6 changed files with 155 additions and 140 deletions

View File

@ -392,6 +392,7 @@ public:
//- Get the patch on the region
const polyPatch& samplePolyPatch() const;
// Helpers
//- Get the sample points

View File

@ -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-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -248,6 +248,7 @@ Foam::tmp<Foam::vectorField> Foam::sampledPatch::sample
return sampleField(vField);
}
Foam::tmp<Foam::sphericalTensorField> Foam::sampledPatch::sample
(
const volSphericalTensorField& vField
@ -292,6 +293,7 @@ Foam::tmp<Foam::vectorField> Foam::sampledPatch::sample
return sampleField(sField);
}
Foam::tmp<Foam::sphericalTensorField> Foam::sampledPatch::sample
(
const surfaceSphericalTensorField& sField
@ -318,6 +320,7 @@ Foam::tmp<Foam::tensorField> Foam::sampledPatch::sample
return sampleField(sField);
}
Foam::tmp<Foam::scalarField> Foam::sampledPatch::interpolate
(
const interpolation<scalar>& interpolator
@ -335,6 +338,7 @@ Foam::tmp<Foam::vectorField> Foam::sampledPatch::interpolate
return interpolateField(interpolator);
}
Foam::tmp<Foam::sphericalTensorField> Foam::sampledPatch::interpolate
(
const interpolation<sphericalTensor>& interpolator

View File

@ -55,6 +55,7 @@ class sampledPatch
//- Private typedefs for convenience
typedef MeshedSurface<face> MeshStorage;
// Private data
//- Name of patches
@ -78,16 +79,17 @@ class sampledPatch
//- Start indices (in patchFaceLabels_) of patches
labelList patchStart_;
// Private Member Functions
//- sample field on faces
//- Sample field on faces
template<class Type>
tmp<Field<Type> > sampleField
(
const GeometricField<Type, fvPatchField, volMesh>& vField
) const;
//- sample surface field on faces
//- Sample surface field on faces
template<class Type>
tmp<Field<Type> > sampleField
(
@ -95,10 +97,9 @@ class sampledPatch
) const;
template<class Type>
tmp<Field<Type> >
interpolateField(const interpolation<Type>&) const;
tmp<Field<Type> > interpolateField(const interpolation<Type>&) const;
//- remap action on triangulation or cleanup
//- Re-map action on triangulation or cleanup
virtual void remapFaces(const labelUList& faceMap);
@ -180,31 +181,32 @@ public:
}
//- sample field on surface
// Sample
//- Sample field on surface
virtual tmp<scalarField> sample
(
const volScalarField&
) const;
//- sample field on surface
//- Sample field on surface
virtual tmp<vectorField> sample
(
const volVectorField&
) const;
//- sample field on surface
//- Sample field on surface
virtual tmp<sphericalTensorField> sample
(
const volSphericalTensorField&
) const;
//- sample field on surface
//- Sample field on surface
virtual tmp<symmTensorField> sample
(
const volSymmTensorField&
) const;
//- sample field on surface
//- Sample field on surface
virtual tmp<tensorField> sample
(
const volTensorField&
@ -240,32 +242,34 @@ public:
const surfaceTensorField&
) const;
//- interpolate field on surface
// Interpolate
//- Interpolate field on surface
virtual tmp<scalarField> interpolate
(
const interpolation<scalar>&
) const;
//- interpolate field on surface
//- Interpolate field on surface
virtual tmp<vectorField> interpolate
(
const interpolation<vector>&
) const;
//- interpolate field on surface
//- Interpolate field on surface
virtual tmp<sphericalTensorField> interpolate
(
const interpolation<sphericalTensor>&
) const;
//- interpolate field on surface
//- Interpolate field on surface
virtual tmp<symmTensorField> interpolate
(
const interpolation<symmTensor>&
) const;
//- interpolate field on surface
//- Interpolate field on surface
virtual tmp<tensorField> interpolate
(
const interpolation<tensor>&

View File

@ -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-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -204,6 +204,7 @@ Foam::tmp<Foam::vectorField> Foam::sampledPatchInternalField::interpolate
return interpolateField(interpolator);
}
Foam::tmp<Foam::sphericalTensorField>
Foam::sampledPatchInternalField::interpolate
(

View File

@ -74,6 +74,7 @@ class sampledPatchInternalField
template<class Type>
tmp<Field<Type> > interpolateField(const interpolation<Type>&) const;
public:
//- Runtime type information
@ -97,68 +98,72 @@ public:
// Member Functions
//- sample field on surface
// Sample
//- Sample field on surface
virtual tmp<scalarField> sample
(
const volScalarField&
) const;
//- sample field on surface
//- Sample field on surface
virtual tmp<vectorField> sample
(
const volVectorField&
) const;
//- sample field on surface
//- Sample field on surface
virtual tmp<sphericalTensorField> sample
(
const volSphericalTensorField&
) const;
//- sample field on surface
//- Sample field on surface
virtual tmp<symmTensorField> sample
(
const volSymmTensorField&
) const;
//- sample field on surface
//- Sample field on surface
virtual tmp<tensorField> sample
(
const volTensorField&
) const;
//- interpolate field on surface
// Interpolate
//- Interpolate field on surface
virtual tmp<scalarField> interpolate
(
const interpolation<scalar>&
) const;
//- interpolate field on surface
//- Interpolate field on surface
virtual tmp<vectorField> interpolate
(
const interpolation<vector>&
) const;
//- interpolate field on surface
//- Interpolate field on surface
virtual tmp<sphericalTensorField> interpolate
(
const interpolation<sphericalTensor>&
) const;
//- interpolate field on surface
//- Interpolate field on surface
virtual tmp<symmTensorField> interpolate
(
const interpolation<symmTensor>&
) const;
//- interpolate field on surface
//- Interpolate field on surface
virtual tmp<tensorField> interpolate
(
const interpolation<tensor>&
) const;
//- Write
virtual void print(Ostream&) const;
};

View File

@ -113,7 +113,7 @@ void Foam::sampledSurfaces::sampleAndWrite
)
{
// interpolator for this field
autoPtr< interpolation<Type> > interpolator;
autoPtr<interpolation<Type> > interpolatorPtr;
const word& fieldName = vField.name();
const fileName outputDir = outputPath_/vField.time().timeName();
@ -126,16 +126,16 @@ void Foam::sampledSurfaces::sampleAndWrite
if (s.interpolate())
{
if (interpolator.empty())
if (interpolatorPtr.empty())
{
interpolator = interpolation<Type>::New
interpolatorPtr = interpolation<Type>::New
(
interpolationScheme_,
vField
);
}
values = s.interpolate(interpolator());
values = s.interpolate(interpolatorPtr());
}
else
{