|
[Sponsors] |
OF23x: const labelList& cZone() and const cellZone& cZone() not working |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 24, 2014, 02:52 |
OF23x: const labelList& cZone() and const cellZone& cZone() not working
|
#1 |
Member
Join Date: Jul 2011
Posts: 54
Rep Power: 15 |
I was just trying to do a loop over all the cells in a cellZone. I am pretty sure that this worked some while ago with 2.2.x. The compiler doesn't complain, but the solver does. I have three examples below which could all be compiled, but the solver stops when he gets to the specific points that I marked. The solver doesn't have a problem getting the cellZone's idea nor getting a reference to the whole cellZoneMesh. It stops when trying to define one single cellZone though. In the 3rd example it stops when getting to the loop, which is basically the same problem for me.
Version 1: Code:
const cellZoneMesh& czm(mesh.cellZones()); // this works const label& zoneID(mesh.cellZones().findZoneID(faceName)); // this works const cellZone& cZone2(czm[zoneID]); // this doesn't work -> solver stops here Code:
const cellZoneMesh& czm(mesh.cellZones()); // this works const label& zoneID(mesh.cellZones().findZoneID(faceName)); // this works const labelList& cZone2(czm[zoneID]); // this doesn't work -> solver stops here Code:
const cellZoneMesh& czm(mesh.cellZones()); // this works const label& zoneID(mesh.cellZones().findZoneID(faceName)); // this works forAll(czm[zoneID], i); // this doesn't work -> solver stops here Does anybody have an idea what I am doing wrong here? |
|
October 24, 2014, 04:37 |
|
#2 |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
I'm not an expert, but I do have 2 general suggestions in analogy with problems I faced with OF23x's cellID.
From the looks of it, Code:
czm[zoneID] Suggestions:
|
|
October 24, 2014, 05:47 |
|
#3 |
Member
Join Date: Jul 2011
Posts: 54
Rep Power: 15 |
Ah yeah that "Sout" output helped me! I was looking for the wrong zoneID! Thanks man!
|
|
|
|