OpenFOAM logo
Open Source CFD Toolkit

cellToFace.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2005 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     cellToFace
00027 
00028 Description
00029     Source of faceSet from cells. Either all faces of cell or some other
00030     criterion. See implementation.
00031 
00032 SourceFiles
00033     cellToFace.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef cellToFace_H
00038 #define cellToFace_H
00039 
00040 #include "topoSetSource.H"
00041 #include "NamedEnum.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 /*---------------------------------------------------------------------------*\
00049                            Class cellToFace Declaration
00050 \*---------------------------------------------------------------------------*/
00051 
00052 class cellToFace
00053 :
00054     public topoSetSource
00055 {
00056 public:
00057         //- Enumeration defining the valid options
00058         enum cellAction
00059         {
00060             ALL,
00061             BOTH
00062         };
00063 
00064 
00065 private:
00066 
00067         //- Add usage string
00068         static addToUsageTable usage_;
00069 
00070         static const NamedEnum<cellAction, 2> cellActionNames_;
00071 
00072         //- Name of set to use
00073         word setName_;
00074 
00075         //- Option
00076         cellAction option_;
00077 
00078 
00079     // Private Member Functions
00080 
00081         //- Depending on face to cell option add to or delete from cellSet.
00082         void combine(topoSet& set, const bool add) const;
00083 
00084 
00085 public:
00086 
00087     //- Runtime type information
00088     TypeName("cellToFace");
00089 
00090     // Constructors
00091 
00092         //- Construct from components
00093         cellToFace
00094         (
00095             const polyMesh& mesh,
00096             const word& setName,
00097             const cellAction option
00098         );
00099 
00100         //- Construct from dictionary
00101         cellToFace
00102         (
00103             const polyMesh& mesh,
00104             const dictionary& dict
00105         );
00106 
00107         //- Construct from Istream
00108         cellToFace
00109         (
00110             const polyMesh& mesh,
00111             Istream&
00112         );
00113 
00114 
00115     // Destructor
00116 
00117         virtual ~cellToFace();
00118 
00119 
00120     // Member Functions
00121 
00122         virtual void applyToSet(const topoSetSource::setAction action, topoSet&)
00123          const;
00124 
00125 };
00126 
00127 
00128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00129 
00130 } // End namespace Foam
00131 
00132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00133 
00134 #endif
00135 
00136 // ************************************************************************* //
For further information go to www.openfoam.org