Skip to content
Snippets Groups Projects
Commit ba10afea authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: add 'filtered' polyMesh regionName() method

- in various situations with mesh regions it is also useful to
  filter out or remove the defaultRegion name (ie, "region0").

  Can now do that conveniently from the polyMesh itself or as a static
  function. Simply use this

      const word& regionDir = polyMesh::regionName(regionName);

  OR  mesh.regionName()

  instead of

      const word& regionDir =
      (
           regionName != polyMesh::defaultRegion
         ? regionName
         : word::null
      );

  Additionally, since the string '/' join operator filters out empty
  strings, the following will work correctly:

      (polyMesh::regionName(regionName)/polyMesh::meshSubDir)

      (mesh.regionName()/polyMesh::meshSubDir)
parent f00f236c
Showing
with 155 additions and 108 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment