boundaryToFace.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "boundaryToFace.H"
00030 #include "polyMesh.H"
00031
00032 #include "addToRunTimeSelectionTable.H"
00033
00034
00035
00036 namespace Foam
00037 {
00038
00039 defineTypeNameAndDebug(boundaryToFace, 0);
00040
00041 addToRunTimeSelectionTable(topoSetSource, boundaryToFace, word);
00042
00043 addToRunTimeSelectionTable(topoSetSource, boundaryToFace, istream);
00044
00045 }
00046
00047
00048 Foam::topoSetSource::addToUsageTable Foam::boundaryToFace::usage_
00049 (
00050 boundaryToFace::typeName,
00051 "\n Usage: boundaryToFace\n\n"
00052 " Select all boundary faces\n\n"
00053 );
00054
00055
00056
00057
00058 void Foam::boundaryToFace::combine(topoSet& set, const bool add) const
00059 {
00060 for
00061 (
00062 label faceI = mesh().nInternalFaces();
00063 faceI < mesh().nFaces();
00064 faceI++
00065 )
00066 {
00067 addOrDelete(set, faceI, add);
00068 }
00069 }
00070
00071
00072
00073
00074
00075 Foam::boundaryToFace::boundaryToFace(const polyMesh& mesh)
00076 :
00077 topoSetSource(mesh)
00078 {}
00079
00080
00081
00082 Foam::boundaryToFace::boundaryToFace(const polyMesh& mesh, const dictionary&)
00083 :
00084 topoSetSource(mesh)
00085 {}
00086
00087
00088
00089 Foam::boundaryToFace::boundaryToFace
00090 (
00091 const polyMesh& mesh,
00092 Istream& is
00093 )
00094 :
00095 topoSetSource(mesh)
00096 {}
00097
00098
00099
00100
00101 Foam::boundaryToFace::~boundaryToFace()
00102 {}
00103
00104
00105
00106
00107 void Foam::boundaryToFace::applyToSet
00108 (
00109 const topoSetSource::setAction action,
00110 topoSet& set
00111 ) const
00112 {
00113 if ((action == topoSetSource::NEW) || (action == topoSetSource::ADD))
00114 {
00115 Info<< " Adding all boundary faces ..." << endl;
00116
00117 combine(set, true);
00118 }
00119 else if (action == topoSetSource::DELETE)
00120 {
00121 Info<< " Removing all boundary faces ..." << endl;
00122
00123 combine(set, false);
00124 }
00125 }
00126
00127
00128
Copyright © 2000-2009 OpenCFD Ltd