diff --git a/src/surfMesh/meshedSurf/meshedSurf.H b/src/surfMesh/meshedSurf/meshedSurf.H new file mode 100644 index 0000000000000000000000000000000000000000..0d7281be04c55c37a83d5a1749bb9019f469c508 --- /dev/null +++ b/src/surfMesh/meshedSurf/meshedSurf.H @@ -0,0 +1,85 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM 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 + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::meshedSurf + +Description + Abstract definition of a meshed surface defined by faces and points. + +\*---------------------------------------------------------------------------*/ + +#ifndef meshedSurf_H +#define meshedSurf_H + +#include "pointField.H" +#include "faceList.H" +#include "ListOps.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class meshedSurf Declaration +\*---------------------------------------------------------------------------*/ + +class meshedSurf +{ +public: + + // Constructors + + //- Construct null + meshedSurf() + {} + + + //- Destructor + virtual ~meshedSurf() + {} + + + // Access Member Functions + + //- Const access to (global) points used for the surface + virtual const pointField& points() const = 0; + + //- Const access to the surface faces + virtual const faceList& faces() const = 0; + + //- Const access to per-face zone/region information + virtual const labelList& zoneIds() const = 0; + +}; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/surfMesh/meshedSurf/meshedSurfRef.H b/src/surfMesh/meshedSurf/meshedSurfRef.H new file mode 100644 index 0000000000000000000000000000000000000000..8390795fb69b2cf86ecb85377a534210ff281cfc --- /dev/null +++ b/src/surfMesh/meshedSurf/meshedSurfRef.H @@ -0,0 +1,119 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM 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 + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::meshedSurfRef + +Description + Implements a meshed surface by referencing existing faces and points. + +\*---------------------------------------------------------------------------*/ + +#ifndef meshedSurfRef_H +#define meshedSurfRef_H + +#include "meshedSurf.H" +#include "labelList.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class meshedSurfRef Declaration +\*---------------------------------------------------------------------------*/ + +class meshedSurfRef +: + public meshedSurf +{ + const pointField& points_; + const faceList& faces_; + const labelList& zoneIds_; + + + // Private Member Functions + + //- Disallow construct as copy + meshedSurfRef(const meshedSurfRef&) = delete; + + //- Disallow default bitwise assignment + void operator=(const meshedSurfRef&) = delete; + +public: + + // Public Member Functions + + // Constructors + + //- Construct from components + meshedSurfRef + ( + const pointField& pts, + const faceList& faces, + const labelList& ids = Foam::emptyLabelList + ) + : + points_(pts), + faces_(faces), + zoneIds_(ids) + {} + + + //- Destructor + virtual ~meshedSurfRef() + {} + + + // Access Member Functions + + //- Const access to (global) points used for the surface + virtual const pointField& points() const + { + return points_; + } + + //- Const access to the surface faces + virtual const faceList& faces() const + { + return faces_; + } + + //- Const access to per-face zone/region information + virtual const labelList& zoneIds() const + { + return zoneIds_; + } + +}; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* //