|
[Sponsors] |
Error about missing file pointZones when using submesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 20, 2016, 22:16 |
Error about missing file pointZones when using submesh
|
#1 |
Senior Member
Thomas Oliveira
Join Date: Apr 2015
Posts: 114
Rep Power: 12 |
Dear all,
From a Foam::fvMesh object and a Foam::labelHashSet object, I create a submesh: Code:
Foam::fvMeshSubset subsetter(mesh); subsetter.setLargeCellSubset(voidCells); Foam::fvMesh& subMesh = subsetter.subMesh(); Code:
Foam::fvMesh mesh ( Foam::IOobject ( Foam::fvMesh::defaultRegion, runTime.timeName(), runTime, Foam::IOobject::MUST_READ ), Xfer < pointField > (subMesh.points()), Xfer < faceList > (subMesh.faces()), Xfer < labelList > (subMesh.faceOwner()), Xfer < labelList > (subMesh.faceNeighbour()) ); Code:
cannot find file /home/user/solver/case/constant/polyMesh/pointZones at line 0. Code:
Foam::fvMesh mesh ( Foam::IOobject ( Foam::fvMesh::defaultRegion, runTime.timeName(), runTime, Foam::IOobject::MUST_READ ), ); Best wishes, Thomas |
|
September 20, 2016, 22:20 |
|
#2 |
Senior Member
Thomas Oliveira
Join Date: Apr 2015
Posts: 114
Rep Power: 12 |
Dear Thomas,
When you use Code:
Foam::fvMesh mesh ( Foam::IOobject ( Foam::fvMesh::defaultRegion, runTime.timeName(), runTime, Foam::IOobject::MUST_READ ), ); When you use Code:
Foam::fvMesh mesh ( Foam::IOobject ( Foam::fvMesh::defaultRegion, runTime.timeName(), runTime, Foam::IOobject::MUST_READ ), Xfer < pointField > (subMesh.points()), Xfer < faceList > (subMesh.faces()), Xfer < labelList > (subMesh.faceOwner()), Xfer < labelList > (subMesh.faceNeighbour()) ); That is why you get the error if the file pointZones doesn't exist just in this second case. You may want to use this instead: Code:
Foam::fvMesh mesh ( Foam::IOobject ( Foam::fvMesh::defaultRegion, runTime.timeName(), runTime, Foam::IOobject::READ_IF_PRESENT ), Xfer < pointField > (subMesh.points()), Xfer < faceList > (subMesh.faces()), Xfer < labelList > (subMesh.faceOwner()), Xfer < labelList > (subMesh.faceNeighbour()) ); Best wishes, Thomas |
|
Tags |
file missing, fvmesh, ioobject, mesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 04:30 |
what is swap4foam ?? | AB08 | OpenFOAM | 28 | February 2, 2016 02:22 |
[Other] How to use finite area method in official OpenFOAM 2.2.0? | Detian Liu | OpenFOAM Meshing & Mesh Conversion | 4 | November 3, 2015 04:04 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 12:44 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |