pointBoundaryMesh.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 "pointBoundaryMesh.H"
00028 #include "polyBoundaryMesh.H"
00029 #include "facePointPatch.H"
00030 #include "globalPointPatch.H"
00031
00032
00033
00034 Foam::pointBoundaryMesh::pointBoundaryMesh
00035 (
00036 const pointMesh& m,
00037 const polyBoundaryMesh& basicBdry
00038 )
00039 :
00040 pointPatchList(basicBdry.size()),
00041 mesh_(m)
00042 {
00043
00044 pointPatchList& Patches = *this;
00045
00046 forAll(Patches, patchI)
00047 {
00048 Patches.set
00049 (
00050 patchI,
00051 facePointPatch::New(basicBdry[patchI], *this).ptr()
00052 );
00053 }
00054 }
00055
00056
00057
00058
00059 void Foam::pointBoundaryMesh::calcGeometry()
00060 {
00061 forAll(*this, patchi)
00062 {
00063 operator[](patchi).initGeometry();
00064 }
00065
00066 forAll(*this, patchi)
00067 {
00068 operator[](patchi).calcGeometry();
00069 }
00070 }
00071
00072
00073 const Foam::globalPointPatch&
00074 Foam::pointBoundaryMesh::globalPatch() const
00075 {
00076 const pointPatchList& patches = *this;
00077
00078 forAll (patches, patchI)
00079 {
00080 if (isType<globalPointPatch>(patches[patchI]))
00081 {
00082 return refCast<const globalPointPatch>(patches[patchI]);
00083 }
00084 }
00085
00086 FatalErrorIn
00087 (
00088 "const pointBoundaryMesh::"
00089 "globalPointPatch& globalPatch() const"
00090 ) << "patch not found."
00091 << abort(FatalError);
00092
00093
00094 return refCast<const globalPointPatch>(patches[0]);
00095 }
00096
00097
00098 void Foam::pointBoundaryMesh::movePoints(const pointField& p)
00099 {
00100 pointPatchList& patches = *this;
00101
00102 forAll(patches, patchi)
00103 {
00104 patches[patchi].initMovePoints(p);
00105 }
00106
00107 forAll(patches, patchi)
00108 {
00109 patches[patchi].movePoints(p);
00110 }
00111 }
00112
00113
00114 void Foam::pointBoundaryMesh::updateMesh()
00115 {
00116 pointPatchList& patches = *this;
00117
00118 forAll(patches, patchi)
00119 {
00120 patches[patchi].initUpdateMesh();
00121 }
00122
00123 forAll(patches, patchi)
00124 {
00125 patches[patchi].updateMesh();
00126 }
00127 }
00128
00129
00130
Copyright © 2000-2009 OpenCFD Ltd