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
00030
00031
00032
00033
00034
00035
00036 #ifndef polyMeshModifier_H
00037 #define polyMeshModifier_H
00038
00039 #include "label.H"
00040 #include "word.H"
00041 #include "Switch.H"
00042 #include "typeInfo.H"
00043 #include "runTimeSelectionTables.H"
00044 #include "autoPtr.H"
00045 #include "pointField.H"
00046 #include "faceList.H"
00047 #include "cellList.H"
00048
00049
00050
00051 namespace Foam
00052 {
00053
00054
00055 class polyTopoChanger;
00056 class polyTopoChange;
00057 class mapPolyMesh;
00058
00059
00060
00061
00062
00063 class polyMeshModifier
00064 {
00065
00066
00067
00068 word name_;
00069
00070
00071 label index_;
00072
00073
00074 const polyTopoChanger& topoChanger_;
00075
00076
00077 mutable Switch active_;
00078
00079
00080
00081
00082
00083 polyMeshModifier(const polyMeshModifier&);
00084
00085
00086 void operator=(const polyMeshModifier&);
00087
00088
00089 public:
00090
00091
00092
00093
00094 TypeName("meshModifier");
00095
00096
00097
00098
00099 declareRunTimeSelectionTable
00100 (
00101 autoPtr,
00102 polyMeshModifier,
00103 dictionary,
00104 (
00105 const word& name,
00106 const dictionary& dict,
00107 const label index,
00108 const polyTopoChanger& mme
00109 ),
00110 (name, dict, index, mme)
00111 );
00112
00113
00114
00115
00116
00117 polyMeshModifier
00118 (
00119 const word& name,
00120 const label index,
00121 const polyTopoChanger& mme,
00122 const bool act
00123 );
00124
00125
00126
00127
00128
00129 static autoPtr<polyMeshModifier> New
00130 (
00131 const word& name,
00132 const dictionary& dict,
00133 const label index,
00134 const polyTopoChanger& mme
00135 );
00136
00137
00138
00139
00140 virtual ~polyMeshModifier();
00141
00142
00143
00144
00145
00146 const word& name() const
00147 {
00148 return name_;
00149 }
00150
00151
00152 label index() const
00153 {
00154 return index_;
00155 }
00156
00157
00158 const polyTopoChanger& topoChanger() const;
00159
00160
00161 virtual bool changeTopology() const = 0;
00162
00163
00164 virtual void setRefinement(polyTopoChange&) const = 0;
00165
00166
00167 virtual void modifyMotionPoints(pointField& motionPoints) const = 0;
00168
00169
00170 virtual void updateMesh(const mapPolyMesh&) = 0;
00171
00172
00173
00174
00175 const Switch& active() const
00176 {
00177 return active_;
00178 }
00179
00180
00181 void enable() const
00182 {
00183 active_ = true;
00184 }
00185
00186
00187 void disable() const
00188 {
00189 active_ = false;
00190 }
00191
00192
00193
00194 virtual void write(Ostream&) const = 0;
00195
00196
00197 virtual void writeDict(Ostream&) const = 0;
00198
00199
00200
00201
00202 friend Ostream& operator<<(Ostream&, const polyMeshModifier&);
00203 };
00204
00205
00206
00207
00208 }
00209
00210
00211
00212 #endif
00213
00214