|
|
|
pointMesh.HGo to the documentation of this file.00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. 00006 \\/ M anipulation | 00007 ------------------------------------------------------------------------------- 00008 License 00009 This file is part of OpenFOAM. 00010 00011 OpenFOAM is free software; you can redistribute it and/or modify it 00012 under the terms of the GNU General Public License as published by the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 option) any later version. 00015 00016 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00019 for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with OpenFOAM; if not, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 Class 00026 Foam::pointMesh 00027 00028 Description 00029 Mesh representing a set of points created from polyMesh. 00030 00031 \*---------------------------------------------------------------------------*/ 00032 00033 #ifndef pointMesh_H 00034 #define pointMesh_H 00035 00036 #include "GeoMesh.H" 00037 #include "MeshObject.H" 00038 #include "polyMesh.H" 00039 #include "pointBoundaryMesh.H" 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 /*---------------------------------------------------------------------------*\ 00047 Class pointMesh Declaration 00048 \*---------------------------------------------------------------------------*/ 00049 00050 class pointMesh 00051 : 00052 public MeshObject<polyMesh, pointMesh>, 00053 public GeoMesh<polyMesh> 00054 { 00055 // Permanent data 00056 00057 //- Boundary mesh 00058 pointBoundaryMesh boundary_; 00059 00060 00061 // Private Member Functions 00062 00063 //- Map all fields 00064 void mapFields(const mapPolyMesh&); 00065 00066 //- Disallow default bitwise copy construct 00067 pointMesh(const pointMesh&); 00068 00069 //- Disallow default bitwise assignment 00070 void operator=(const pointMesh&); 00071 00072 00073 public: 00074 00075 typedef pointMesh Mesh; 00076 typedef pointBoundaryMesh BoundaryMesh; 00077 00078 00079 // Constructors 00080 00081 //- Construct from polyMesh 00082 explicit pointMesh 00083 ( 00084 const polyMesh& pMesh, 00085 bool alwaysConstructGlobalPatch = false 00086 ); 00087 00088 00089 // Member Functions 00090 00091 //- Return number of points 00092 label size() const 00093 { 00094 return size(*this); 00095 } 00096 00097 //- Return number of points 00098 static label size(const Mesh& mesh) 00099 { 00100 return mesh.GeoMesh<polyMesh>::mesh_.nPoints(); 00101 } 00102 00103 //- Return reference to boundary mesh 00104 const pointBoundaryMesh& boundary() const 00105 { 00106 return boundary_; 00107 } 00108 00109 //- Return parallel info 00110 const globalMeshData& globalData() const 00111 { 00112 return GeoMesh<polyMesh>::mesh_.globalData(); 00113 } 00114 00115 //- Return database. For now is its polyMesh. 00116 const objectRegistry& thisDb() const 00117 { 00118 return GeoMesh<polyMesh>::mesh_.thisDb(); 00119 } 00120 00121 00122 // Mesh motion 00123 00124 //- Move points, returns volumes swept by faces in motion 00125 void movePoints(const pointField&); 00126 00127 //- Update the mesh corresponding to given map 00128 void updateMesh(const mapPolyMesh& mpm); 00129 00130 00131 // Member Operators 00132 00133 bool operator!=(const pointMesh& pm) const 00134 { 00135 return &pm != this; 00136 } 00137 00138 bool operator==(const pointMesh& pm) const 00139 { 00140 return &pm == this; 00141 } 00142 }; 00143 00144 00145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00146 00147 } // End namespace Foam 00148 00149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00150 00151 #endif 00152 00153 // ************************************************************************* // |