pointMesh.C
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 #include "pointMesh.H"
00028 #include "globalMeshData.H"
00029 #include "globalPointPatch.H"
00030 #include "pointMeshMapper.H"
00031 #include "pointFields.H"
00032 #include "MapGeometricFields.H"
00033 #include "MapPointField.H"
00034
00035
00036
00037 void Foam::pointMesh::mapFields(const mapPolyMesh& mpm)
00038 {
00039
00040 const pointMeshMapper m(*this, mpm);
00041
00042 MapGeometricFields<scalar, pointPatchField, pointMeshMapper, pointMesh>(m);
00043 MapGeometricFields<vector, pointPatchField, pointMeshMapper, pointMesh>(m);
00044 MapGeometricFields
00045 <
00046 sphericalTensor,
00047 pointPatchField,
00048 pointMeshMapper,
00049 pointMesh
00050 >(m);
00051 MapGeometricFields<symmTensor, pointPatchField, pointMeshMapper, pointMesh>
00052 (m);
00053 MapGeometricFields<tensor, pointPatchField, pointMeshMapper, pointMesh>(m);
00054 }
00055
00056
00057
00058
00059 Foam::pointMesh::pointMesh
00060 (
00061 const polyMesh& pMesh,
00062 bool alwaysConstructGlobalPatch
00063 )
00064 :
00065 MeshObject<polyMesh, pointMesh>(pMesh),
00066 GeoMesh<polyMesh>(pMesh),
00067 boundary_(*this, pMesh.boundaryMesh())
00068 {
00069
00070 if
00071 (
00072 alwaysConstructGlobalPatch
00073 || GeoMesh<polyMesh>::mesh_.globalData().nGlobalPoints()
00074 )
00075 {
00076 boundary_.setSize(boundary_.size() + 1);
00077
00078 boundary_.set
00079 (
00080 boundary_.size() - 1,
00081 new globalPointPatch
00082 (
00083 boundary_,
00084 boundary_.size() - 1
00085 )
00086 );
00087 }
00088
00089
00090 boundary_.calcGeometry();
00091 }
00092
00093
00094 void Foam::pointMesh::movePoints(const pointField& newPoints)
00095 {
00096 boundary_.movePoints(newPoints);
00097 }
00098
00099
00100 void Foam::pointMesh::updateMesh(const mapPolyMesh& mpm)
00101 {
00102 boundary_.updateMesh();
00103
00104
00105 mapFields(mpm);
00106 }
00107
00108
00109
Copyright © 2000-2009 OpenCFD Ltd