|
[Sponsors] |
Is there tip on Openfoam programming about arbitrary unknown function? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 11, 2024, 04:04 |
Is there tip on Openfoam programming about arbitrary unknown function?
|
#1 |
Member
Song Young Ik
Join Date: Apr 2022
Location: South Korea
Posts: 59
Rep Power: 4 |
For example, when I want to analyse what line does, lets say there is line
const face compactFace(identityMap(newFace.size())); I can guess that I am defining constant face named 'compactFace' and initializing as value identityMap(newFace.size()), where newFace is value given in the code before, so we can guess it will be initialized as identityMap(known value). But problem here is that identityMap isn't forementioned in this code, so it must have been from other file which header is mentioned at start of the file. Is there easy way to find origin of such function easily and figure out what these things do? Or is it only way to search for every class file mentioned? |
|
February 11, 2024, 05:30 |
|
#2 |
Senior Member
Join Date: Oct 2017
Posts: 133
Rep Power: 9 |
You could use the C++ Source Code Guide: https://api.openfoam.com/2312/ or https://cpp.openfoam.org/v11/ (Depends on which OpenFOAM fork you are using.).
|
|
February 12, 2024, 03:14 |
|
#3 |
New Member
Martin
Join Date: Jul 2022
Posts: 16
Rep Power: 4 |
or you could use grep(https://linux.fandom.com/wiki/Grep) on your local OpenFOAM source code ...
|
|
February 12, 2024, 06:06 |
|
#4 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Quote:
This also looks like someone's special code definition somewhere. I would normally use the Foam identity() function: Code:
const face compactFace(identity(newFace.size())); Code:
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a list of label values. Optionally with an alternative start index, so that (map[i] == i+start) |
||
Tags |
class, function, header, identitymap, programming |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error in enabling the python wrapper | Jinn | SU2 Installation | 2 | April 23, 2022 14:52 |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 18:22 |
Map of the OpenFOAM Forum - Understanding where to post your questions! | wyldckat | OpenFOAM | 10 | September 2, 2021 06:29 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 07:42 |
Droplet Evaporation | Christian | Main CFD Forum | 2 | February 27, 2007 07:27 |