Write out labelListList cellCells()
Hello all,
I am attempting to write out cell center connectivity to a file. I started with the foamToFluent utility and modified it according to my needs. However, my C++ and research skills are rapidly running out. From https://www.cfd-online.com/Forums/op...edge-cell.html and https://jibranhaider.com/blog/mesh-i...connectivities I know that I need to access cellCells() and that it is a labelListList. My understanding is that this is a list of lists, which makes sense. The section of my code indented to write this information to file is below. When compiling I am getting an error relating to, I believe, a mismatch in expected data type for the ```edge_list << neighbour[celli] ``` command. This error message is shown below. I think my lack of understanding of labelListList is the root cause of this error. And after some exhaustive searching I am not sure of where to go from here. I would greatly appreciate help in understanding what I am doing wrong. I can easily imagine that naively calling cellCells()[celli] is not how I should go about this, but without knowing the structure of cellCells I am left to guess. Any help is greatly appreciated, thank you, - Sam Compiler error message: Code:
error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘const Foam::List<int>’) Code:
// Open a file for the edges |
Using OFstream instead of std :: ofstream will work better.
BTW you should not be taking a copy when you obtain the cellCells() - use a const ref instead. The structure of labelListList is in the name - a list of lists of labels. |
All times are GMT -4. The time now is 02:55. |