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 
00046 
00047 
00048 
00049 
00050 
00051 
00052 
00053 #ifndef surfaceSlipDisplacementPointPatchVectorField_H
00054 #define surfaceSlipDisplacementPointPatchVectorField_H
00055 
00056 #include <OpenFOAM/pointPatchFields.H>
00057 #include <meshTools/searchableSurfaces.H>
00058 
00059 
00060 
00061 namespace Foam
00062 {
00063 
00064 
00065 
00066 
00067 
00068 class surfaceSlipDisplacementPointPatchVectorField
00069 :
00070     public pointPatchVectorField
00071 {
00072 
00073 public:
00074 
00075     
00076 
00077         enum projectMode
00078         {
00079             NEAREST,
00080             POINTNORMAL,
00081             FIXEDNORMAL
00082         };
00083 
00084 private:
00085 
00086     
00087 
00088         
00089         static const NamedEnum<projectMode, 3> projectModeNames_;
00090 
00091         
00092         const dictionary surfacesDict_;
00093 
00094         
00095         const projectMode projectMode_;
00096 
00097         
00098         const vector projectDir_;
00099 
00100         
00101         const label wedgePlane_;
00102 
00103         
00104         const word frozenPointsZone_;
00105 
00106         
00107         mutable autoPtr<searchableSurfaces> surfacesPtr_;
00108 
00109 
00110     
00111 
00112         
00113         void calcProjection(vectorField& displacement) const;
00114 
00115         
00116         void operator=(const surfaceSlipDisplacementPointPatchVectorField&);
00117 
00118 
00119 public:
00120 
00121     
00122     TypeName("surfaceSlipDisplacement");
00123 
00124 
00125     
00126 
00127         
00128         surfaceSlipDisplacementPointPatchVectorField
00129         (
00130             const pointPatch&,
00131             const DimensionedField<vector, pointMesh>&
00132         );
00133 
00134         
00135         surfaceSlipDisplacementPointPatchVectorField
00136         (
00137             const pointPatch&,
00138             const DimensionedField<vector, pointMesh>&,
00139             const dictionary&
00140         );
00141 
00142         
00143         surfaceSlipDisplacementPointPatchVectorField
00144         (
00145             const surfaceSlipDisplacementPointPatchVectorField&,
00146             const pointPatch&,
00147             const DimensionedField<vector, pointMesh>&,
00148             const pointPatchFieldMapper&
00149         );
00150 
00151         
00152         surfaceSlipDisplacementPointPatchVectorField
00153         (
00154             const surfaceSlipDisplacementPointPatchVectorField&
00155         );
00156 
00157         
00158         virtual autoPtr<pointPatchVectorField> clone() const
00159         {
00160             return autoPtr<pointPatchVectorField>
00161             (
00162                 new surfaceSlipDisplacementPointPatchVectorField
00163                 (
00164                     *this
00165                 )
00166             );
00167         }
00168 
00169         
00170         surfaceSlipDisplacementPointPatchVectorField
00171         (
00172             const surfaceSlipDisplacementPointPatchVectorField&,
00173             const DimensionedField<vector, pointMesh>&
00174         );
00175 
00176         
00177         virtual autoPtr<pointPatchVectorField> clone
00178         (
00179             const DimensionedField<vector, pointMesh>& iF
00180         ) const
00181         {
00182             return autoPtr<pointPatchVectorField>
00183             (
00184                 new surfaceSlipDisplacementPointPatchVectorField
00185                 (
00186                     *this,
00187                     iF
00188                 )
00189             );
00190         }
00191 
00192     
00193 
00194         
00195         const searchableSurfaces& surfaces() const;
00196 
00197         
00198         virtual void evaluate
00199         (
00200             const Pstream::commsTypes commsType=Pstream::blocking
00201         );
00202 
00203         
00204         virtual void write(Ostream&) const;
00205 };
00206 
00207 
00208 
00209 
00210 } 
00211 
00212 
00213 
00214 #endif
00215 
00216