View Issue Details

IDProjectCategoryView StatusLast Update
0002437OpenFOAMBugpublic2017-01-19 08:27
Reportersjoshi Assigned Tohenry  
PriorityhighSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version14.04
Summary0002437: setsToZones does not find sets directory for multiregion meshes
DescriptionsetsToZones is a utility to convert all cellSets to cellZones. It works fine for single-region meshes.

For multiregion meshes, despite providing the -region <regionName> tag, it crashes with the following error message:

--> FOAM FATAL ERROR:
Cannot find directory "polyMesh/sets" in times 0 down to constant

    From function Foam::word Foam::Time::findInstance(const Foam::fileName&, const Foam::word&, Foam::IOobject::readOption, const Foam::word&) const
    in file db/Time/findInstance.C at line 145.
Steps To Reproduce1. Download bugReport-setsToZones.zip
2. Unzip and open in terminal.
3. Source OpenFOAM environment
4. run "./Allrun.pre"
Additional InformationThe reason for this crash is that the directory-to-search argument to the findInstance function is: polyMesh::meshSubDir/"sets"

This returns "polyMesh/sets", which is correct for single-region meshes.

To make this work for multiregion meshes, this argument needs to be changed to: mesh.meshDir()/"sets". It then returns the right directory "regionName/polyMesh/sets"

See attached patch.
TagsNo tags attached.

Activities

sjoshi

2017-01-18 10:41

reporter  

wyldckat

2017-01-19 01:00

updater   ~0007651

@Henry: Attached is the package "bugfix_2437_4x.tar.gz", which provides the updated file "applications/utilities/mesh/manipulation/setsToZones/setsToZones.C", which can be applied to OpenFOAM 4.1, 4.x and dev.



@sjoshi: Many thanks for the detailed report and test case!

I don't know which installation instructions you've followed, but in principle you can unpack the attached file at OpenFOAM's main folder and then build the application, for example by running:

  foam
  tar -xf ~/Downloads/bugfix_2437_4x.tar.gz
  wmake applications/utilities/mesh/manipulation/setsToZones
bugfix_2437_4x.tar.gz (2,909 bytes)

henry

2017-01-19 08:27

manager   ~0007652

Thanks for the analysis of the problem and the patch which resolves the issue and related Info messages.

Resolved in OpenFOAM-4.x by commit 98113110d801e5b4c8379ce0c62c66f6f1038dee

Resolved in OpenFOAM-dev by commit a402896d50837fbb91d275b4b5b123e9fc823a9d

Issue History

Date Modified Username Field Change
2017-01-18 10:41 sjoshi New Issue
2017-01-18 10:41 sjoshi File Added: bugReport-setsToZones.zip
2017-01-19 01:00 wyldckat File Added: bugfix_2437_4x.tar.gz
2017-01-19 01:00 wyldckat Note Added: 0007651
2017-01-19 01:01 wyldckat Assigned To => henry
2017-01-19 01:01 wyldckat Status new => assigned
2017-01-19 08:27 henry Status assigned => resolved
2017-01-19 08:27 henry Resolution open => fixed
2017-01-19 08:27 henry Note Added: 0007652