mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Code formatting updates
This commit is contained in:
@ -392,6 +392,7 @@ public:
|
|||||||
//- Get the patch on the region
|
//- Get the patch on the region
|
||||||
const polyPatch& samplePolyPatch() const;
|
const polyPatch& samplePolyPatch() const;
|
||||||
|
|
||||||
|
|
||||||
// Helpers
|
// Helpers
|
||||||
|
|
||||||
//- Get the sample points
|
//- Get the sample points
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -248,6 +248,7 @@ Foam::tmp<Foam::vectorField> Foam::sampledPatch::sample
|
|||||||
return sampleField(vField);
|
return sampleField(vField);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::sphericalTensorField> Foam::sampledPatch::sample
|
Foam::tmp<Foam::sphericalTensorField> Foam::sampledPatch::sample
|
||||||
(
|
(
|
||||||
const volSphericalTensorField& vField
|
const volSphericalTensorField& vField
|
||||||
@ -292,6 +293,7 @@ Foam::tmp<Foam::vectorField> Foam::sampledPatch::sample
|
|||||||
return sampleField(sField);
|
return sampleField(sField);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::sphericalTensorField> Foam::sampledPatch::sample
|
Foam::tmp<Foam::sphericalTensorField> Foam::sampledPatch::sample
|
||||||
(
|
(
|
||||||
const surfaceSphericalTensorField& sField
|
const surfaceSphericalTensorField& sField
|
||||||
@ -318,6 +320,7 @@ Foam::tmp<Foam::tensorField> Foam::sampledPatch::sample
|
|||||||
return sampleField(sField);
|
return sampleField(sField);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::scalarField> Foam::sampledPatch::interpolate
|
Foam::tmp<Foam::scalarField> Foam::sampledPatch::interpolate
|
||||||
(
|
(
|
||||||
const interpolation<scalar>& interpolator
|
const interpolation<scalar>& interpolator
|
||||||
@ -335,6 +338,7 @@ Foam::tmp<Foam::vectorField> Foam::sampledPatch::interpolate
|
|||||||
return interpolateField(interpolator);
|
return interpolateField(interpolator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::sphericalTensorField> Foam::sampledPatch::interpolate
|
Foam::tmp<Foam::sphericalTensorField> Foam::sampledPatch::interpolate
|
||||||
(
|
(
|
||||||
const interpolation<sphericalTensor>& interpolator
|
const interpolation<sphericalTensor>& interpolator
|
||||||
|
|||||||
@ -53,7 +53,8 @@ class sampledPatch
|
|||||||
public sampledSurface
|
public sampledSurface
|
||||||
{
|
{
|
||||||
//- Private typedefs for convenience
|
//- Private typedefs for convenience
|
||||||
typedef MeshedSurface<face> MeshStorage;
|
typedef MeshedSurface<face> MeshStorage;
|
||||||
|
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
@ -78,16 +79,17 @@ class sampledPatch
|
|||||||
//- Start indices (in patchFaceLabels_) of patches
|
//- Start indices (in patchFaceLabels_) of patches
|
||||||
labelList patchStart_;
|
labelList patchStart_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- sample field on faces
|
//- Sample field on faces
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > sampleField
|
tmp<Field<Type> > sampleField
|
||||||
(
|
(
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& vField
|
const GeometricField<Type, fvPatchField, volMesh>& vField
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- sample surface field on faces
|
//- Sample surface field on faces
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > sampleField
|
tmp<Field<Type> > sampleField
|
||||||
(
|
(
|
||||||
@ -95,10 +97,9 @@ class sampledPatch
|
|||||||
) const;
|
) const;
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> >
|
tmp<Field<Type> > interpolateField(const interpolation<Type>&) const;
|
||||||
interpolateField(const interpolation<Type>&) const;
|
|
||||||
|
|
||||||
//- remap action on triangulation or cleanup
|
//- Re-map action on triangulation or cleanup
|
||||||
virtual void remapFaces(const labelUList& faceMap);
|
virtual void remapFaces(const labelUList& faceMap);
|
||||||
|
|
||||||
|
|
||||||
@ -180,96 +181,99 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//- sample field on surface
|
// Sample
|
||||||
virtual tmp<scalarField> sample
|
//- Sample field on surface
|
||||||
(
|
virtual tmp<scalarField> sample
|
||||||
const volScalarField&
|
(
|
||||||
) const;
|
const volScalarField&
|
||||||
|
) const;
|
||||||
|
|
||||||
//- sample field on surface
|
//- Sample field on surface
|
||||||
virtual tmp<vectorField> sample
|
virtual tmp<vectorField> sample
|
||||||
(
|
(
|
||||||
const volVectorField&
|
const volVectorField&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- sample field on surface
|
//- Sample field on surface
|
||||||
virtual tmp<sphericalTensorField> sample
|
virtual tmp<sphericalTensorField> sample
|
||||||
(
|
(
|
||||||
const volSphericalTensorField&
|
const volSphericalTensorField&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- sample field on surface
|
//- Sample field on surface
|
||||||
virtual tmp<symmTensorField> sample
|
virtual tmp<symmTensorField> sample
|
||||||
(
|
(
|
||||||
const volSymmTensorField&
|
const volSymmTensorField&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- sample field on surface
|
//- Sample field on surface
|
||||||
virtual tmp<tensorField> sample
|
virtual tmp<tensorField> sample
|
||||||
(
|
(
|
||||||
const volTensorField&
|
const volTensorField&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Surface sample field on surface
|
//- Surface sample field on surface
|
||||||
virtual tmp<scalarField> sample
|
virtual tmp<scalarField> sample
|
||||||
(
|
(
|
||||||
const surfaceScalarField&
|
const surfaceScalarField&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Surface Sample field on surface
|
//- Surface Sample field on surface
|
||||||
virtual tmp<vectorField> sample
|
virtual tmp<vectorField> sample
|
||||||
(
|
(
|
||||||
const surfaceVectorField&
|
const surfaceVectorField&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Surface sample field on surface
|
//- Surface sample field on surface
|
||||||
virtual tmp<sphericalTensorField> sample
|
virtual tmp<sphericalTensorField> sample
|
||||||
(
|
(
|
||||||
const surfaceSphericalTensorField&
|
const surfaceSphericalTensorField&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Surface sample field on surface
|
//- Surface sample field on surface
|
||||||
virtual tmp<symmTensorField> sample
|
virtual tmp<symmTensorField> sample
|
||||||
(
|
(
|
||||||
const surfaceSymmTensorField&
|
const surfaceSymmTensorField&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Surface sample field on surface
|
//- Surface sample field on surface
|
||||||
virtual tmp<tensorField> sample
|
virtual tmp<tensorField> sample
|
||||||
(
|
(
|
||||||
const surfaceTensorField&
|
const surfaceTensorField&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- interpolate field on surface
|
|
||||||
virtual tmp<scalarField> interpolate
|
|
||||||
(
|
|
||||||
const interpolation<scalar>&
|
|
||||||
) const;
|
|
||||||
|
|
||||||
|
|
||||||
//- interpolate field on surface
|
// Interpolate
|
||||||
virtual tmp<vectorField> interpolate
|
|
||||||
(
|
|
||||||
const interpolation<vector>&
|
|
||||||
) const;
|
|
||||||
|
|
||||||
//- interpolate field on surface
|
//- Interpolate field on surface
|
||||||
virtual tmp<sphericalTensorField> interpolate
|
virtual tmp<scalarField> interpolate
|
||||||
(
|
(
|
||||||
const interpolation<sphericalTensor>&
|
const interpolation<scalar>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- interpolate field on surface
|
//- Interpolate field on surface
|
||||||
virtual tmp<symmTensorField> interpolate
|
virtual tmp<vectorField> interpolate
|
||||||
(
|
(
|
||||||
const interpolation<symmTensor>&
|
const interpolation<vector>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- interpolate field on surface
|
//- Interpolate field on surface
|
||||||
virtual tmp<tensorField> interpolate
|
virtual tmp<sphericalTensorField> interpolate
|
||||||
(
|
(
|
||||||
const interpolation<tensor>&
|
const interpolation<sphericalTensor>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
//- Interpolate field on surface
|
||||||
|
virtual tmp<symmTensorField> interpolate
|
||||||
|
(
|
||||||
|
const interpolation<symmTensor>&
|
||||||
|
) const;
|
||||||
|
|
||||||
|
//- Interpolate field on surface
|
||||||
|
virtual tmp<tensorField> interpolate
|
||||||
|
(
|
||||||
|
const interpolation<tensor>&
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
virtual void print(Ostream&) const;
|
virtual void print(Ostream&) const;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -204,6 +204,7 @@ Foam::tmp<Foam::vectorField> Foam::sampledPatchInternalField::interpolate
|
|||||||
return interpolateField(interpolator);
|
return interpolateField(interpolator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::sphericalTensorField>
|
Foam::tmp<Foam::sphericalTensorField>
|
||||||
Foam::sampledPatchInternalField::interpolate
|
Foam::sampledPatchInternalField::interpolate
|
||||||
(
|
(
|
||||||
|
|||||||
@ -49,7 +49,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class sampledPatchInternalField Declaration
|
Class sampledPatchInternalField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class sampledPatchInternalField
|
class sampledPatchInternalField
|
||||||
@ -74,6 +74,7 @@ class sampledPatchInternalField
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > interpolateField(const interpolation<Type>&) const;
|
tmp<Field<Type> > interpolateField(const interpolation<Type>&) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
@ -97,67 +98,71 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- sample field on surface
|
// Sample
|
||||||
virtual tmp<scalarField> sample
|
|
||||||
(
|
|
||||||
const volScalarField&
|
|
||||||
) const;
|
|
||||||
|
|
||||||
//- sample field on surface
|
//- Sample field on surface
|
||||||
virtual tmp<vectorField> sample
|
virtual tmp<scalarField> sample
|
||||||
(
|
(
|
||||||
const volVectorField&
|
const volScalarField&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- sample field on surface
|
//- Sample field on surface
|
||||||
virtual tmp<sphericalTensorField> sample
|
virtual tmp<vectorField> sample
|
||||||
(
|
(
|
||||||
const volSphericalTensorField&
|
const volVectorField&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- sample field on surface
|
//- Sample field on surface
|
||||||
virtual tmp<symmTensorField> sample
|
virtual tmp<sphericalTensorField> sample
|
||||||
(
|
(
|
||||||
const volSymmTensorField&
|
const volSphericalTensorField&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- sample field on surface
|
//- Sample field on surface
|
||||||
virtual tmp<tensorField> sample
|
virtual tmp<symmTensorField> sample
|
||||||
(
|
(
|
||||||
const volTensorField&
|
const volSymmTensorField&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
//- Sample field on surface
|
||||||
|
virtual tmp<tensorField> sample
|
||||||
|
(
|
||||||
|
const volTensorField&
|
||||||
|
) const;
|
||||||
|
|
||||||
|
|
||||||
//- interpolate field on surface
|
// Interpolate
|
||||||
virtual tmp<scalarField> interpolate
|
|
||||||
(
|
|
||||||
const interpolation<scalar>&
|
|
||||||
) const;
|
|
||||||
|
|
||||||
|
//- Interpolate field on surface
|
||||||
|
virtual tmp<scalarField> interpolate
|
||||||
|
(
|
||||||
|
const interpolation<scalar>&
|
||||||
|
) const;
|
||||||
|
|
||||||
//- interpolate field on surface
|
//- Interpolate field on surface
|
||||||
virtual tmp<vectorField> interpolate
|
virtual tmp<vectorField> interpolate
|
||||||
(
|
(
|
||||||
const interpolation<vector>&
|
const interpolation<vector>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- interpolate field on surface
|
//- Interpolate field on surface
|
||||||
virtual tmp<sphericalTensorField> interpolate
|
virtual tmp<sphericalTensorField> interpolate
|
||||||
(
|
(
|
||||||
const interpolation<sphericalTensor>&
|
const interpolation<sphericalTensor>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- interpolate field on surface
|
//- Interpolate field on surface
|
||||||
virtual tmp<symmTensorField> interpolate
|
virtual tmp<symmTensorField> interpolate
|
||||||
(
|
(
|
||||||
const interpolation<symmTensor>&
|
const interpolation<symmTensor>&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
//- Interpolate field on surface
|
||||||
|
virtual tmp<tensorField> interpolate
|
||||||
|
(
|
||||||
|
const interpolation<tensor>&
|
||||||
|
) const;
|
||||||
|
|
||||||
//- interpolate field on surface
|
|
||||||
virtual tmp<tensorField> interpolate
|
|
||||||
(
|
|
||||||
const interpolation<tensor>&
|
|
||||||
) const;
|
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
virtual void print(Ostream&) const;
|
virtual void print(Ostream&) const;
|
||||||
|
|||||||
@ -113,9 +113,9 @@ void Foam::sampledSurfaces::sampleAndWrite
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
// interpolator for this field
|
// interpolator for this field
|
||||||
autoPtr< interpolation<Type> > interpolator;
|
autoPtr<interpolation<Type> > interpolatorPtr;
|
||||||
|
|
||||||
const word& fieldName = vField.name();
|
const word& fieldName = vField.name();
|
||||||
const fileName outputDir = outputPath_/vField.time().timeName();
|
const fileName outputDir = outputPath_/vField.time().timeName();
|
||||||
|
|
||||||
forAll(*this, surfI)
|
forAll(*this, surfI)
|
||||||
@ -126,16 +126,16 @@ void Foam::sampledSurfaces::sampleAndWrite
|
|||||||
|
|
||||||
if (s.interpolate())
|
if (s.interpolate())
|
||||||
{
|
{
|
||||||
if (interpolator.empty())
|
if (interpolatorPtr.empty())
|
||||||
{
|
{
|
||||||
interpolator = interpolation<Type>::New
|
interpolatorPtr = interpolation<Type>::New
|
||||||
(
|
(
|
||||||
interpolationScheme_,
|
interpolationScheme_,
|
||||||
vField
|
vField
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
values = s.interpolate(interpolator());
|
values = s.interpolate(interpolatorPtr());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user