WENO Schemes for OpenFOAM v5
1 Attachment(s)
Hi everyone,
I am trying to apply WENO scheme that is build based on OpenFOAM v2.3 to OpenFOAM v5. https://github.com/TobiasMartin/WENO...bWENOEXT-2.3.x However, when i compile the new library I got error as shown in the attached figure. It would be appreciate if could someone help me to fix this error. Thanks and Best regards |
The definition of the factorial function changed from of 2.3 to 5. In 2.3 it takes a scalar as argument and returns a scalar. In 5 it takes a label (int) as argument and returns a label. So you have to change the function calls in the weno schemes accordingly.
|
Your library runs this code:
Code:
Foam::scalar Foam::geometryWENO::Fac(scalar x) Code:
Foam::factorial(x) There are 2 versions of overloaded function factorial in OpenFOAM, with function parameters being uLabel and label: Code:
54 Foam::uLabel Foam::factorial(uLabel n) Code:
63 Foam::label Foam::factorial(label n) Code:
return Foam::factorial(static_cast<uLabel>(x)); |
Quote:
I've been in contact with Tobias, the author of the library, and offered to upgrade the library so that it compiles across most version of OF and he agreed. I will get this done in the next month. That being said, I quickly patched the library to get it compiled on OFv1806, check the fork by timofeymukha on GitHub. The downside is that the tutorial crashed :p. I hope me and Tobias together can make things work. |
Quote:
Could you please share with me some update, I also would like to read to get more understanding OpenFOAM. Thanks and Best regards |
Dear all,
I am happy to say that after me and Tobias having put in some work, the library should now work for modern OpenFOAM versions, both .org and .com. Please feel free to test it. I should say directly that any questions regarding the functionality are better directed at Tobias, since I've only helped with the version upgrade, but now little about how the code functions. Best, Timofey |
All times are GMT -4. The time now is 15:19. |