OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

moveMesh.H

Go to the documentation of this file.
00001 
00002 //
00003 // Check if new points (so moving mesh)
00004 //
00005 {
00006     IOobject pointsHeader
00007     (
00008         "points",
00009         runTime.timeName(),
00010         polyMesh::defaultRegion,
00011         runTime
00012     );
00013     if (pointsHeader.headerOk())
00014     {
00015         // points exists for time step, let's read them
00016         Info<< "    Points file detected - updating points" << endl;
00017 
00018         // Reading new points
00019         pointIOField newPoints
00020         (
00021             IOobject
00022             (
00023                 "points",
00024                 runTime.timeName(),
00025                 polyMesh::defaultRegion,
00026                 mesh,
00027                 IOobject::MUST_READ,
00028                 IOobject::NO_WRITE
00029             )
00030         );
00031 
00032         mesh.polyMesh::movePoints(newPoints);
00033     }
00034 }
Copyright © 2000-2009 OpenCFD Ltd