Permalink
Browse files

ENH: dynamicFvMesh: added region support

  • Loading branch information...
1 parent 12fd7d7 commit ba860a65e2ea49d11a9747c0a7bf0eb12c9dd36a mattijs committed Sep 20, 2012
Showing with 32 additions and 0 deletions.
  1. +32 −0 src/dynamicFvMesh/include/createNamedDynamicFvMesh.H
@@ -0,0 +1,32 @@
+ Foam::word regionName;
+
+ if (args.optionReadIfPresent("region", regionName))
+ {
+ Foam::Info
+ << "Create mesh " << regionName << " for time = "
+ << runTime.timeName() << Foam::nl << Foam::endl;
+ }
+ else
+ {
+ regionName = Foam::fvMesh::defaultRegion;
+ Foam::Info
+ << "Create mesh for time = "
+ << runTime.timeName() << Foam::nl << Foam::endl;
+ }
+
+
+ autoPtr<dynamicFvMesh> meshPtr
+ (
+ dynamicFvMesh::New
+ (
+ IOobject
+ (
+ regionName,
+ runTime.timeName(),
+ runTime,
+ IOobject::MUST_READ
+ )
+ )
+ );
+
+ dynamicFvMesh& mesh = meshPtr();

0 comments on commit ba860a6

Please sign in to comment.