Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
91ac6f90
Commit
91ac6f90
authored
Nov 11, 2010
by
Andrew Heather
Browse files
STYLE: minor code formatting
parent
cb45c789
Changes
9
Hide whitespace changes
Inline
Side-by-side
src/sampling/sampledSurface/distanceSurface/distanceSurface.C
View file @
91ac6f90
...
...
@@ -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
...
...
src/sampling/sampledSurface/sampledPatch/sampledPatch.C
View file @
91ac6f90
...
...
@@ -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
...
...
src/sampling/sampledSurface/sampledPlane/sampledPlane.C
View file @
91ac6f90
...
...
@@ -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
...
...
src/sampling/sampledSurface/sampledSurface/sampledSurface.C
View file @
91ac6f90
...
...
@@ -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
;
}
// ************************************************************************* //
src/sampling/sampledSurface/sampledSurface/sampledSurface.H
View file @
91ac6f90
...
...
@@ -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,33 +137,36 @@ 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
&
);
};
...
...
src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C
View file @
91ac6f90
...
...
@@ -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
}
// ************************************************************************* //
src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C
View file @
91ac6f90
...
...
@@ -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
...
...
src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.C
View file @
91ac6f90
...
...
@@ -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
}