|
[Sponsors] |
Compilation error when using boost Bessel function in OpenFOAM |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 14, 2023, 11:54 |
Compilation error when using boost Bessel function in OpenFOAM
|
#1 |
New Member
Join Date: Apr 2023
Posts: 1
Rep Power: 0 |
Hi,
I am trying to make a custom solver based on pimpleFoam, which includes a Bessel function in an equation which I added in the PIMPLE-loop. In the beginning of the solver, I have an include-statement which I believe I need to use the Bessel-function from boost: Code:
#include <boost/math/special_functions/bessel.hpp> Code:
usr/include/boost/math/special_functions/detail/bernoulli_details.hpp: In function ‘std::size_t boost::math::detail::find_bernoulli_overflow_limit(const false_type&)’: /usr/include/boost/math/special_functions/detail/bernoulli_details.hpp:104:63: error: call of overloaded ‘sqrt(double)’ is ambiguous 104 | double result = boost::math::tools::toms748_solve(fun, sqrt(double(t)), double(t), tol, max_iter).first / 2; Code:
/opt/openfoam10/src/OpenFOAM/lnInclude/dimensionedScalar.H:65:19: note: candidate: ‘Foam::dimensionedScalar Foam::sqrt(const dimensionedScalar&)’ 65 | dimensionedScalar sqrt(const dimensionedScalar&); | ^~~~ make: *** [/opt/openfoam10/wmake/rules/General/transform:26: Make/linux64GccDPInt32Opt/cEHDfoam.o] Error 1 What could I do to solve this problem? If I include other boost library functions, for example "elliptic integral" from the "special functions" directory, then it compiles without error. So the error seems localized to bessel. And it seems the compiler is complaining about "sqrt( )" somehow (which I didn't type in or add anywhere, must come from boost). Very strange! I'm thankful for any tips/suggestions you may have. |
|
Tags |
bessel, boost, compilation, error, library |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Map of the OpenFOAM Forum - Understanding where to post your questions! | wyldckat | OpenFOAM | 10 | September 2, 2021 06:29 |
[swak4Foam] installation problem with version 0.2.3 | Claudio87 | OpenFOAM Community Contributions | 9 | May 8, 2013 11:20 |
[blockMesh] non-orthogonal faces and incorrect orientation? | nennbs | OpenFOAM Meshing & Mesh Conversion | 7 | April 17, 2013 06:42 |
latest OpenFOAM-1.6.x from git failed to compile | phsieh2005 | OpenFOAM Bugs | 25 | February 9, 2010 05:37 |
Droplet Evaporation | Christian | Main CFD Forum | 2 | February 27, 2007 07:27 |