Commit 3dffee8a authored by Mark Olesen's avatar Mark Olesen
Browse files

STYLE: change MeshedSurface 'faces' access to 'surfFaces' (related to issue #104)

- use surfFaces() to return the templated list of faces.
  This frees up the method 'faces()' to be used as a virtual method,
  which will be needed at a later stage.
parent c7d7cbca
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -785,7 +785,7 @@ int main(int argc, char *argv[])
if (flipNormals)
{
Info<< "Flipping faces." << nl << endl;
faceList& faces = const_cast<faceList&>(fMesh.faces());
faceList& faces = const_cast<faceList&>(fMesh.surfFaces());
forAll(faces, i)
{
faces[i] = fMesh[i].reverseFace();
......
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -172,7 +172,7 @@ void Foam::patchToPoly2DMesh::addPatchFacesToFaces()
void Foam::patchToPoly2DMesh::addPatchFacesToOwner()
{
const label nInternalEdges = patch_.nInternalEdges();
const faceList& faces = patch_.faces();
const faceList& faces = patch_.surfFaces();
const label nExternalEdges = patch_.edges().size() - nInternalEdges;
const labelList& meshPoints = patch_.meshPoints();
......
......@@ -232,7 +232,7 @@ Foam::shortEdgeFilter2D::filter()
// These are global indices.
const pointField& points = ms_.points();
const edgeList& edges = ms_.edges();
const faceList& faces = ms_.faces();
const faceList& faces = ms_.surfFaces();
const labelList& meshPoints = ms_.meshPoints();
const labelList& boundaryPoints = ms_.boundaryPoints();
......
......@@ -7,5 +7,4 @@ EXE_INC = \
LIB_LIBS = \
-ltriSurface \
-lmeshTools \
-lfileFormats \
-lsurfMesh
......@@ -14,7 +14,6 @@ LIB_LIBS = \
-lfiniteVolume \
-llagrangian \
-lmeshTools \
-lfileFormats \
-ledgeMesh \
-lsurfMesh \
-ltriSurface \
......
......@@ -5,5 +5,4 @@ EXE_INC = \
LIB_LIBS = \
-ltriSurface \
-lsurfMesh \
-lfileFormats
-lsurfMesh
......@@ -7,5 +7,4 @@ EXE_INC = \
LIB_LIBS = \
-L$(FFTW_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) -lfftw3 \
-lfiniteVolume \
-lsampling \
-lsurfMesh
-lsampling
......@@ -295,7 +295,7 @@ Foam::scalar surfaceNoise::writeSurfaceData
outDir,
fName,
surf.points(),
surf.faces(),
surf.surfFaces(),
title,
allData,
false
......@@ -318,7 +318,7 @@ Foam::scalar surfaceNoise::writeSurfaceData
outDir,
fName,
surf.points(),
surf.faces(),
surf.surfFaces(),
title,
data,
false
......
......@@ -13,7 +13,6 @@ LIB_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lsurfMesh \
-lfileFormats \
-ltriSurface \
-llagrangian \
-ldynamicMesh \
......
......@@ -177,7 +177,7 @@ public:
//- Faces of surface
virtual const faceList& faces() const
{
return MeshStorage::faces();
return MeshStorage::surfFaces();
}
//- Face area vectors
......
......@@ -137,7 +137,7 @@ public:
//- Faces of surface
virtual const faceList& faces() const
{
return cuttingPlane::faces();
return cuttingPlane::surfFaces();
}
//- Face area magnitudes
......
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......
......@@ -213,7 +213,7 @@ public:
//- Faces of surface
virtual const faceList& faces() const
{
return MeshStorage::faces();
return MeshStorage::surfFaces();
}
//- Face area vectors
......
......@@ -145,7 +145,7 @@ public:
//- Faces of surface
virtual const faceList& faces() const
{
return MeshStorage::faces();
return MeshStorage::surfFaces();
}
//- Face area vectors (normals)
......
......@@ -209,7 +209,7 @@ Foam::MeshedSurface<Face>::MeshedSurface
const MeshedSurface<Face>& surf
)
:
ParentType(surf.faces(), surf.points()),
ParentType(surf.surfFaces(), surf.points()),
zones_(surf.surfZones())
{}
......@@ -225,7 +225,7 @@ Foam::MeshedSurface<Face>::MeshedSurface
labelList faceMap;
this->storedZones() = surf.sortedZones(faceMap);
const List<Face>& origFaces = surf.faces();
const List<Face>& origFaces = surf;
List<Face> newFaces(origFaces.size());
forAll(newFaces, facei)
......@@ -1167,7 +1167,7 @@ void Foam::MeshedSurface<Face>::operator=(const MeshedSurface& surf)
clear();
this->storedPoints() = surf.points();
this->storedFaces() = surf.faces();
this->storedFaces() = surf.surfFaces();
this->storedZones() = surf.surfZones();
}
......@@ -1178,7 +1178,7 @@ Foam::MeshedSurface<Face>::operator Foam::MeshedSurfaceProxy<Face>() const
return MeshedSurfaceProxy<Face>
(
this->points(),
this->faces(),
this->surfFaces(),
this->surfZones()
);
}
......
......@@ -326,7 +326,7 @@ public:
}
//- Return const access to the faces
inline const List<Face>& faces() const
inline const List<Face>& surfFaces() const
{
return static_cast<const List<Face>&>(*this);
}
......
......@@ -47,7 +47,7 @@ Foam::Ostream& Foam::MeshedSurface<Face>::write(Ostream& os) const
{
os << this->surfZones()
<< this->points()
<< this->faces();
<< this->surfFaces();
os.check("MeshedSurface::write(Ostream&) const");
return os;
......
......@@ -65,10 +65,10 @@ class MeshedSurfaceIOAllocator
// Private Member Functions
//- Disallow default bitwise copy construct
MeshedSurfaceIOAllocator(const MeshedSurfaceIOAllocator&);
MeshedSurfaceIOAllocator(const MeshedSurfaceIOAllocator&) = delete;
//- Disallow default bitwise assignment
void operator=(const MeshedSurfaceIOAllocator&);
void operator=(const MeshedSurfaceIOAllocator&) = delete;
public:
......
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -171,11 +171,11 @@ void Foam::MeshedSurfaceProxy<Face>::write
if (this->useFaceMap())
{
// this is really a bit annoying (and wasteful) but no other way
os << reorder(this->faceMap(), this->faces());
os << reorder(this->faceMap(), this->surfFaces());
}
else
{
os << this->faces();
os << this->surfFaces();
}
io.writeEndDivider(os);
......
......@@ -146,7 +146,7 @@ public:
}
//- Return const access to the faces
inline const List<Face>& faces() const
inline const List<Face>& surfFaces() const
{
return faces_;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment