Access to cellid in cellSet
Hello all,
If I read a cellSet like: Code:
cellSet foobar(mesh, nameOfSet); I did not figure it out how to get access to the values of the cellSet (cellId 's)? Any suggestion would be appreciated. |
As cellSet is a topoSet child class class maybe you can have a look in the way they use iterators and labels in topoSet, for example in the functions:
Foam::topoSet::invert Foam::topoSet::updateLabels Sorry that I cannot help you more, as my C++ knowledge is pretty basic |
Thanks for the replay.
I also checked topoSet in doxygen but I did not find any function. There has to be a way :D Foam is so awesome but I do not know the classes very well. |
Solved!
As always soooo easy. I wanted to have access only to the cellSet cells in some postProcessing. Due to the fact that cellSet is inherit by a hash table. Therefore I get it with that: Code:
|
Quote:
I suggest to use test.toc() to access the contents of the table directly. Code:
test.toc() |
Use the native access method provided by OpenFOAM
Hey guys,
I am also looking for the access method to cellSet, after digging into the code, I found a native way provided by OpenFOAM in the file fvOption.C, see the lines (147-148) and lines (236-240). For convenience, I paste the code here Code:
Code:
V_ = 0.0; |
All times are GMT -4. The time now is 20:18. |