attachDetach.H
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
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 #ifndef attachDetach_H
00046 #define attachDetach_H
00047
00048 #include "polyMeshModifier.H"
00049 #include "polyPatchID.H"
00050 #include "ZoneIDs.H"
00051
00052
00053
00054 namespace Foam
00055 {
00056
00057
00058
00059
00060
00061 class attachDetach
00062 :
00063 public polyMeshModifier
00064 {
00065
00066
00067
00068 enum modifierState
00069 {
00070 UNKNOWN,
00071 ATTACHED,
00072 DETACHED
00073 };
00074
00075
00076
00077
00078
00079 faceZoneID faceZoneID_;
00080
00081
00082 polyPatchID masterPatchID_;
00083
00084
00085 polyPatchID slavePatchID_;
00086
00087
00088 scalarField triggerTimes_;
00089
00090
00091 Switch manualTrigger_;
00092
00093
00094 mutable label triggerIndex_;
00095
00096
00097 mutable modifierState state_;
00098
00099
00100 mutable bool trigger_;
00101
00102
00103
00104
00105
00106 mutable Map<label>* pointMatchMapPtr_;
00107
00108
00109
00110
00111
00112 attachDetach(const attachDetach&);
00113
00114
00115 void operator=(const attachDetach&);
00116
00117
00118 void checkDefinition();
00119
00120
00121
00122
00123 void attachInterface(polyTopoChange&) const;
00124
00125
00126 void detachInterface(polyTopoChange&) const;
00127
00128
00129 void calcPointMatchMap() const;
00130
00131
00132 const Map<label>& pointMatchMap() const;
00133
00134
00135 void clearAddressing() const;
00136
00137
00138
00139
00140
00141 static const scalar positionDifference_;
00142
00143
00144 public:
00145
00146
00147 TypeName("attachDetach");
00148
00149
00150
00151
00152
00153 attachDetach
00154 (
00155 const word& name,
00156 const label index,
00157 const polyTopoChanger& mme,
00158 const word& faceZoneName,
00159 const word& masterPatchName,
00160 const word& slavePatchName,
00161 const scalarField& triggerTimes,
00162 const bool manualTrigger = false
00163 );
00164
00165
00166 attachDetach
00167 (
00168 const word& name,
00169 const dictionary& dict,
00170 const label index,
00171 const polyTopoChanger& mesh
00172 );
00173
00174
00175
00176
00177 virtual ~attachDetach();
00178
00179
00180
00181
00182
00183 const polyPatchID& masterPatchID() const
00184 {
00185 return masterPatchID_;
00186 }
00187
00188
00189 const polyPatchID& slavePatchID() const
00190 {
00191 return slavePatchID_;
00192 }
00193
00194
00195 bool attached() const
00196 {
00197 return state_ == ATTACHED;
00198 }
00199
00200 const Switch& manualTrigger() const
00201 {
00202 return manualTrigger_;
00203 }
00204
00205
00206 bool setAttach() const;
00207
00208
00209 bool setDetach() const;
00210
00211
00212 virtual bool changeTopology() const;
00213
00214
00215
00216 virtual void setRefinement(polyTopoChange&) const;
00217
00218
00219 virtual void modifyMotionPoints(pointField& motionPoints) const;
00220
00221
00222 virtual void updateMesh(const mapPolyMesh&);
00223
00224
00225 const scalarField& triggerTimes() const
00226 {
00227 return triggerTimes_;
00228 }
00229
00230
00231
00232 virtual void write(Ostream&) const;
00233
00234
00235 virtual void writeDict(Ostream&) const;
00236 };
00237
00238
00239
00240
00241 }
00242
00243
00244
00245 #endif
00246
00247
Copyright © 2000-2009 OpenCFD Ltd