Skip to content
Permalink
Browse files

sampledSurface: Created a sampledSurfaces namespace for the sampledSu…

…rface classes

to rationalise the structure and class names to avoid the need for the confusing
addNamedToRunTimeSelectionTable and use instead use the standard
addToRunTimeSelectionTable to populate the run-time selection table.
  • Loading branch information...
Henry Weller
Henry Weller committed Jan 21, 2019
1 parent cd8aee2 commit 8baec3bc5d54bae10938e1dfe2e9384a27807b76
Showing with 425 additions and 422 deletions.
  1. +1 −1 etc/caseDicts/postProcessing/pressure/pressureDifferenceSurface.cfg
  2. +1 −1 etc/caseDicts/postProcessing/surfaceFieldValue/triSurfaceRegion.cfg
  3. +2 −8 src/parallel/decompose/decompositionMethods/noDecomp/noDecomp.C
  4. +2 −2 src/parallel/decompose/decompositionMethods/noDecomp/noDecomp.H
  5. +32 −24 src/sampling/sampledSurface/distanceSurface/distanceSurface.C
  6. +7 −4 src/sampling/sampledSurface/distanceSurface/distanceSurface.H
  7. +3 −5 src/sampling/sampledSurface/distanceSurface/distanceSurfaceTemplates.C
  8. +36 −39 src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C
  9. +12 −9 src/sampling/sampledSurface/isoSurface/sampledIsoSurface.H
  10. +3 −5 src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTemplates.C
  11. +28 −34 src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C
  12. +12 −9 src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H
  13. +3 −5 src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlaneTemplates.C
  14. +31 −33 src/sampling/sampledSurface/sampledPatch/sampledPatch.C
  15. +13 −10 src/sampling/sampledSurface/sampledPatch/sampledPatch.H
  16. +4 −4 src/sampling/sampledSurface/sampledPatch/sampledPatchTemplates.C
  17. +31 −29 src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalField.C
  18. +13 −10 src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalField.H
  19. +3 −3 src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalFieldTemplates.C
  20. +27 −27 src/sampling/sampledSurface/sampledPlane/sampledPlane.C
  21. +13 −10 src/sampling/sampledSurface/sampledPlane/sampledPlane.H
  22. +3 −3 src/sampling/sampledSurface/sampledPlane/sampledPlaneTemplates.C
  23. +2 −4 src/sampling/sampledSurface/sampledSurface/sampledSurface.C
  24. +3 −1 src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C
  25. +1 −6 src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C
  26. +1 −4 src/sampling/sampledSurface/sampledSurfaces/sampledSurfacesGrouping.C
  27. +59 −45 src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C
  28. +18 −14 src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.H
  29. +3 −3 src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMeshTemplates.C
  30. +38 −35 src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.C
  31. +13 −10 src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.H
  32. +3 −7 src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFacesTemplates.C
  33. +2 −8 src/sampling/sampledSurface/thresholdCellFaces/thresholdCellFaces.C
  34. +1 −2 src/sampling/sampledSurface/thresholdCellFaces/thresholdCellFaces.H
  35. +1 −8 src/sampling/sampledSurface/writers/surfaceWriter.C
@@ -14,7 +14,7 @@ region1

sampledSurfaceDict
{
type sampledTriSurfaceMesh;
type triSurfaceMesh;
regionType cells;
interpolate true;
surface $triSurface1;
@@ -12,7 +12,7 @@ regionType sampledSurface;

sampledSurfaceDict
{
type sampledTriSurfaceMesh;
type triSurfaceMesh;
surface $triSurface;
source cells;
interpolate true;
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -32,13 +32,7 @@ namespace Foam
{
defineTypeName(noDecomp);

addNamedToRunTimeSelectionTable
(
decompositionMethod,
noDecomp,
dictionary,
none
);
addToRunTimeSelectionTable(decompositionMethod, noDecomp, dictionary);
}


@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -59,7 +59,7 @@ class noDecomp
public:

//- Runtime type information
TypeName("noDecomp");
TypeName("none");


// Constructors
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -24,24 +24,22 @@ License
\*---------------------------------------------------------------------------*/

#include "distanceSurface.H"
#include "dictionary.H"
#include "volFields.H"
#include "volPointInterpolation.H"
#include "addToRunTimeSelectionTable.H"
#include "fvMesh.H"
#include "volumeType.H"

// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

namespace Foam
{
namespace sampledSurfaces
{
defineTypeNameAndDebug(distanceSurface, 0);
addToRunTimeSelectionTable(sampledSurface, distanceSurface, word);
}
}

// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

void Foam::distanceSurface::createGeometry()
void Foam::sampledSurfaces::distanceSurface::createGeometry()
{
if (debug)
{
@@ -285,7 +283,7 @@ void Foam::distanceSurface::createGeometry()

// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

Foam::distanceSurface::distanceSurface
Foam::sampledSurfaces::distanceSurface::distanceSurface
(
const word& name,
const polyMesh& mesh,
@@ -320,7 +318,7 @@ Foam::distanceSurface::distanceSurface
{}


Foam::distanceSurface::distanceSurface
Foam::sampledSurfaces::distanceSurface::distanceSurface
(
const word& name,
const polyMesh& mesh,
@@ -363,19 +361,19 @@ Foam::distanceSurface::distanceSurface

// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //

Foam::distanceSurface::~distanceSurface()
Foam::sampledSurfaces::distanceSurface::~distanceSurface()
{}


// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //

bool Foam::distanceSurface::needsUpdate() const
bool Foam::sampledSurfaces::distanceSurface::needsUpdate() const
{
return needsUpdate_;
}


bool Foam::distanceSurface::expire()
bool Foam::sampledSurfaces::distanceSurface::expire()
{
if (debug)
{
@@ -397,7 +395,7 @@ bool Foam::distanceSurface::expire()
}


bool Foam::distanceSurface::update()
bool Foam::sampledSurfaces::distanceSurface::update()
{
if (debug)
{
@@ -417,7 +415,8 @@ bool Foam::distanceSurface::update()
}


Foam::tmp<Foam::scalarField> Foam::distanceSurface::sample
Foam::tmp<Foam::scalarField>
Foam::sampledSurfaces::distanceSurface::sample
(
const volScalarField& vField
) const
@@ -426,7 +425,8 @@ Foam::tmp<Foam::scalarField> Foam::distanceSurface::sample
}


Foam::tmp<Foam::vectorField> Foam::distanceSurface::sample
Foam::tmp<Foam::vectorField>
Foam::sampledSurfaces::distanceSurface::sample
(
const volVectorField& vField
) const
@@ -435,7 +435,8 @@ Foam::tmp<Foam::vectorField> Foam::distanceSurface::sample
}


Foam::tmp<Foam::sphericalTensorField> Foam::distanceSurface::sample
Foam::tmp<Foam::sphericalTensorField>
Foam::sampledSurfaces::distanceSurface::sample
(
const volSphericalTensorField& vField
) const
@@ -444,7 +445,8 @@ Foam::tmp<Foam::sphericalTensorField> Foam::distanceSurface::sample
}


Foam::tmp<Foam::symmTensorField> Foam::distanceSurface::sample
Foam::tmp<Foam::symmTensorField>
Foam::sampledSurfaces::distanceSurface::sample
(
const volSymmTensorField& vField
) const
@@ -453,7 +455,8 @@ Foam::tmp<Foam::symmTensorField> Foam::distanceSurface::sample
}


Foam::tmp<Foam::tensorField> Foam::distanceSurface::sample
Foam::tmp<Foam::tensorField>
Foam::sampledSurfaces::distanceSurface::sample
(
const volTensorField& vField
) const
@@ -462,7 +465,8 @@ Foam::tmp<Foam::tensorField> Foam::distanceSurface::sample
}


Foam::tmp<Foam::scalarField> Foam::distanceSurface::interpolate
Foam::tmp<Foam::scalarField>
Foam::sampledSurfaces::distanceSurface::interpolate
(
const interpolation<scalar>& interpolator
) const
@@ -471,15 +475,17 @@ Foam::tmp<Foam::scalarField> Foam::distanceSurface::interpolate
}


Foam::tmp<Foam::vectorField> Foam::distanceSurface::interpolate
Foam::tmp<Foam::vectorField>
Foam::sampledSurfaces::distanceSurface::interpolate
(
const interpolation<vector>& interpolator
) const
{
return interpolateField(interpolator);
}

Foam::tmp<Foam::sphericalTensorField> Foam::distanceSurface::interpolate
Foam::tmp<Foam::sphericalTensorField>
Foam::sampledSurfaces::distanceSurface::interpolate
(
const interpolation<sphericalTensor>& interpolator
) const
@@ -488,7 +494,8 @@ Foam::tmp<Foam::sphericalTensorField> Foam::distanceSurface::interpolate
}


Foam::tmp<Foam::symmTensorField> Foam::distanceSurface::interpolate
Foam::tmp<Foam::symmTensorField>
Foam::sampledSurfaces::distanceSurface::interpolate
(
const interpolation<symmTensor>& interpolator
) const
@@ -497,7 +504,8 @@ Foam::tmp<Foam::symmTensorField> Foam::distanceSurface::interpolate
}


Foam::tmp<Foam::tensorField> Foam::distanceSurface::interpolate
Foam::tmp<Foam::tensorField>
Foam::sampledSurfaces::distanceSurface::interpolate
(
const interpolation<tensor>& interpolator
) const
@@ -506,7 +514,7 @@ Foam::tmp<Foam::tensorField> Foam::distanceSurface::interpolate
}


void Foam::distanceSurface::print(Ostream& os) const
void Foam::sampledSurfaces::distanceSurface::print(Ostream& os) const
{
os << "distanceSurface: " << name() << " :"
<< " surface:" << surfPtr_().name()
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::distanceSurface
Foam::sampledSurfaces::distanceSurface
Description
A sampledSurface defined by a distance to a surface.
@@ -32,8 +32,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/

#ifndef distanceSurface_H
#define distanceSurface_H
#ifndef sampledSurfaces_distanceSurface_H
#define sampledSurfaces_distanceSurface_H

#include "sampledSurface.H"
#include "searchableSurface.H"
@@ -43,6 +43,8 @@ SourceFiles

namespace Foam
{
namespace sampledSurfaces
{

/*---------------------------------------------------------------------------*\
Class distanceSurface Declaration
@@ -238,6 +240,7 @@ public:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

} // End namespace sampledSurfaces
} // End namespace Foam

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -24,15 +24,13 @@ License
\*---------------------------------------------------------------------------*/

#include "distanceSurface.H"
#include "volFieldsFwd.H"
#include "pointFields.H"
#include "volPointInterpolation.H"

// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

template<class Type>
Foam::tmp<Foam::Field<Type>>
Foam::distanceSurface::sampleField
Foam::sampledSurfaces::distanceSurface::sampleField
(
const GeometricField<Type, fvPatchField, volMesh>& vField
) const
@@ -46,7 +44,7 @@ Foam::distanceSurface::sampleField

template<class Type>
Foam::tmp<Foam::Field<Type>>
Foam::distanceSurface::interpolateField
Foam::sampledSurfaces::distanceSurface::interpolateField
(
const interpolation<Type>& interpolator
) const

0 comments on commit 8baec3b

Please sign in to comment.
You can’t perform that action at this time.