This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/utilities/postProcessing/dataConversion/foamToFieldview9/fieldviewTopology.H

177 lines
4.3 KiB
C
Raw Normal View History

/*---------------------------------------------------------------------------*\
========= |
2013-12-11 16:09:41 +00:00
\\ / F ield | foam-extend: Open Source CFD
\\ / O peration |
2013-12-11 16:09:41 +00:00
\\ / A nd | For copyright notice see file Copyright
\\/ M anipulation |
-------------------------------------------------------------------------------
License
2013-12-11 16:09:41 +00:00
This file is part of foam-extend.
2013-12-11 16:09:41 +00:00
foam-extend is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
2013-12-11 16:09:41 +00:00
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
2013-12-11 16:09:41 +00:00
foam-extend is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
2013-12-11 16:09:41 +00:00
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::fieldviewTopology
Description
SourceFiles
fieldviewTopology.C
\*---------------------------------------------------------------------------*/
#ifndef fieldviewTopology_H
#define fieldviewTopology_H
#include "labelList.H"
#include "faceList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// Forward declaration of classes
class polyMesh;
class cellShape;
/*---------------------------------------------------------------------------*\
Class fieldviewTopology Declaration
\*---------------------------------------------------------------------------*/
class fieldviewTopology
{
// Private data
//- Hexes in fieldview format
labelList hexLabels_;
labelList prismLabels_;
labelList pyrLabels_;
labelList tetLabels_;
//- Number of non-hex/prism/pyr/tet labels
label nPoly_;
//
// Patches
//
//- Quad and tri patch faces in fv format
labelListList quadFaceLabels_;
//- Number of polyhedral faces per patch
labelList nPolyFaces_;
// Private Member Functions
static labelList calcFaceAddressing
(
const faceList& allFaces, // faces given faceLabels
const cellShape& shape,
const labelList& faces, // faceLabels for given cell
const label cellI
);
//- Disallow default bitwise copy construct
fieldviewTopology(const fieldviewTopology&);
//- Disallow default bitwise assignment
void operator=(const fieldviewTopology&);
public:
// Constructors
//- Construct from components
fieldviewTopology(const polyMesh& mesh, const bool setWallInfo);
// Member Functions
// Access
const labelList& hexLabels() const
{
return hexLabels_;
}
const labelList& prismLabels() const
{
return prismLabels_;
}
const labelList& pyrLabels() const
{
return pyrLabels_;
}
const labelList& tetLabels() const
{
return tetLabels_;
}
label nHex() const
{
return hexLabels().size()/9;
}
label nPrism() const
{
return prismLabels().size()/7;
}
label nPyr() const
{
return pyrLabels().size()/6;
}
label nTet() const
{
return tetLabels().size()/5;
}
label nPoly() const
{
return nPoly_;
}
const labelListList& quadFaceLabels() const
{
return quadFaceLabels_;
}
const labelList& nPolyFaces() const
{
return nPolyFaces_;
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //