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 #include "PrimitivePatch_.H"
00027 #include <OpenFOAM/demandDrivenData.H>
00028
00029
00030
00031
00032 template
00033 <
00034 class Face,
00035 template<class> class FaceList,
00036 class PointField,
00037 class PointType
00038 >
00039 void
00040 Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
00041 clearGeom()
00042 {
00043 if (debug)
00044 {
00045 Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
00046 << "clearGeom() : clearing geometric data"
00047 << endl;
00048 }
00049
00050 deleteDemandDrivenData(localPointsPtr_);
00051 deleteDemandDrivenData(faceCentresPtr_);
00052 deleteDemandDrivenData(faceNormalsPtr_);
00053 deleteDemandDrivenData(pointNormalsPtr_);
00054 }
00055
00056
00057 template
00058 <
00059 class Face,
00060 template<class> class FaceList,
00061 class PointField,
00062 class PointType
00063 >
00064 void
00065 Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
00066 clearTopology()
00067 {
00068 if (debug)
00069 {
00070 Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
00071 << "clearTopology() : clearing patch addressing"
00072 << endl;
00073 }
00074
00075
00076 if (edgesPtr_ && faceFacesPtr_ && edgeFacesPtr_ && faceEdgesPtr_)
00077 {
00078 delete edgesPtr_;
00079 edgesPtr_ = NULL;
00080
00081 delete faceFacesPtr_;
00082 faceFacesPtr_ = NULL;
00083
00084 delete edgeFacesPtr_;
00085 edgeFacesPtr_ = NULL;
00086
00087 delete faceEdgesPtr_;
00088 faceEdgesPtr_ = NULL;
00089 }
00090
00091 deleteDemandDrivenData(boundaryPointsPtr_);
00092 deleteDemandDrivenData(pointEdgesPtr_);
00093 deleteDemandDrivenData(pointFacesPtr_);
00094 deleteDemandDrivenData(edgeLoopsPtr_);
00095 }
00096
00097
00098 template
00099 <
00100 class Face,
00101 template<class> class FaceList,
00102 class PointField,
00103 class PointType
00104 >
00105 void
00106 Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
00107 clearPatchMeshAddr()
00108 {
00109 if (debug)
00110 {
00111 Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
00112 << "clearPatchMeshAddr() : "
00113 << "clearing patch-mesh addressing"
00114 << endl;
00115 }
00116
00117 deleteDemandDrivenData(meshPointsPtr_);
00118 deleteDemandDrivenData(meshPointMapPtr_);
00119 deleteDemandDrivenData(localFacesPtr_);
00120 }
00121
00122
00123 template
00124 <
00125 class Face,
00126 template<class> class FaceList,
00127 class PointField,
00128 class PointType
00129 >
00130 void
00131 Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
00132 clearOut()
00133 {
00134 clearGeom();
00135 clearTopology();
00136 clearPatchMeshAddr();
00137 }
00138
00139
00140