|
[Sponsors] |
October 8, 2018, 18:35 |
How to access cellSet elements?
|
#1 |
Senior Member
Join Date: Mar 2018
Posts: 115
Rep Power: 8 |
In my code, I can add cell IDs to a cellSet
Code:
cellSet myCellSet ( IOobject ( "myCellSet", runTime.timeName(), runTime, IOobject::MUST_READ, IOobject::AUTO_WRITE ) ); myCellSet.clear(); const volVectorField& C = mesh.C(); const vector origin(0.0,0.0,0.0); forAll(C, i) { if((mag(C[i] - origin) < 0.6) && (mag(C[i] - origin) > 0.5) ) { myCellSet.insert(i); } } Code:
Info << myCellSet.sortedToc()[0] << endl; NOTE: The code works very well and the myCellSet is written to the directories (the remaining code is not shown here). In summary the question is very simple: Why the following syntax doesn't give the expected result: Code:
myCellSet[0] #s3gt_translate_tooltip_mini { display: none !important; }[/COLOR] |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Access to cellid in cellSet | Tobi | OpenFOAM Programming & Development | 5 | April 16, 2017 21:05 |
Access (x y z) coordinates of cellSet | hxaxtma | OpenFOAM Programming & Development | 1 | January 21, 2016 05:40 |
Ansys SIG$ILL error | loth | ANSYS | 3 | December 24, 2015 05:31 |
How can I access to a volTensorField elements? urgent!!! | adambarfi | OpenFOAM Running, Solving & CFD | 6 | May 14, 2013 16:28 |
CFX4.3 -build analysis form | Chie Min | CFX | 5 | July 12, 2001 23:19 |