writeMesh.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
00028
00029
00030 #include "starMesh.H"
00031 #include "Time.H"
00032 #include "polyMesh.H"
00033
00034
00035
00036 void starMesh::writeMesh()
00037 {
00038 if (isShapeMesh_)
00039 {
00040 Info << "This is a shapeMesh." << endl;
00041
00042 Info << "Default patch type set to empty" << endl;
00043
00044 clearExtraStorage();
00045
00046 polyMesh pShapeMesh
00047 (
00048 IOobject
00049 (
00050 polyMesh::defaultRegion,
00051 runTime_.constant(),
00052 runTime_
00053 ),
00054 xferCopy(points_),
00055 cellShapes_,
00056 boundary_,
00057 patchNames_,
00058 patchTypes_,
00059 defaultFacesName_,
00060 defaultFacesType_,
00061 patchPhysicalTypes_
00062 );
00063
00064 Info << "Writing polyMesh" << endl;
00065 pShapeMesh.write();
00066 }
00067 else
00068 {
00069
00070
00071 createPolyMeshData();
00072
00073 Info << "This is a polyMesh" << endl;
00074
00075 clearExtraStorage();
00076
00077 polyMesh pMesh
00078 (
00079 IOobject
00080 (
00081 polyMesh::defaultRegion,
00082 runTime_.constant(),
00083 runTime_
00084 ),
00085 xferCopy(points_),
00086 xferCopy(meshFaces_),
00087 xferCopy(cellPolys_)
00088 );
00089
00090
00091 pMesh.addPatches(polyBoundaryPatches(pMesh));
00092
00093 Info << "Writing polyMesh" << endl;
00094 pMesh.write();
00095 }
00096 }
00097
00098
00099
Copyright © 2000-2009 OpenCFD Ltd