|
[Sponsors] |
June 17, 2024, 06:42 |
checking if cell is within a cellzone
|
#1 |
Senior Member
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 365
Rep Power: 8 |
hi,
is it possible to check if a cell is within a cellzone? i could basically store a checkId and then loop over all cells within that cellzone and then check if Id of both are equal. but that would take up so much computation time for my domain size. is there a faster way of doing that? |
|
June 17, 2024, 12:50 |
|
#2 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 724
Rep Power: 14 |
You could set up a list, one entry per cell, with a 1 if it's in the cellZone and 0 if not. Do this at the start of the run, and then keep the list. For later iterations, then it's just a simple look-up in the list, i.e. ultra fast.
|
|
June 18, 2024, 05:50 |
|
#3 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
Quote:
Something as simple as this? Code:
label zonei = mesh.cellZones().whichZone(cellId); if (zonei < 0) { ... } |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[CGNS] CGNS converters available | mbeaudoin | OpenFOAM Meshing & Mesh Conversion | 137 | December 14, 2018 04:20 |
[foam-extend.org] Installation problem for foam-extend-3.2 on Ubuntu 14.04 | ahmet | OpenFOAM Installation | 5 | July 4, 2018 02:51 |
Journal file error | magicalmarshmallow | FLUENT | 3 | April 4, 2014 12:25 |
HELP! grid check failed in parallel fluent | restart | FLUENT | 0 | March 5, 2011 09:55 |
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 | flakid | OpenFOAM Installation | 16 | December 28, 2010 08:48 |