Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid ambiguous type conversion when accessing tmp<vectorField> #358

Closed
wants to merge 2 commits into from

Conversation

MakisH
Copy link
Member

@MakisH MakisH commented Mar 21, 2025

Reported by a user using the Intel compiler (OneAPI 2023.2, RHEL 8, OpenFOAM v2406) in the forum.

Resolves errors such as:

In file included from FF/ModuleFF.C:3:
FF/Velocity.C:95:25: error: conversion from 'tmp<vectorField>' (aka 'tmp<Field<Vector<double>>>') to 'vectorField' (aka 'Field<Vector<double>>') is ambiguous
            vectorField n = U_->boundaryField()[patchID].patch().nf();
                        ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/leonardo/prod/spack/05/install/0.21/linux-rhel8-icelake/oneapi-2023.2.0/openfoam-2406-psbdrns5bo35czf4hemtwyre65rfdf32/src/OpenFOAM/lnInclude/tmp.H:320:9: note: candidate function
        operator const T&() const { return cref(); }
        ^
/leonardo/prod/spack/05/install/0.21/linux-rhel8-icelake/oneapi-2023.2.0/openfoam-2406-psbdrns5bo35czf4hemtwyre65rfdf32/src/OpenFOAM/lnInclude/Field.H:266:16: note: candidate constructor
        inline Field(const tmp<Field<Type>>& tfld);
               ^

@MakisH MakisH self-assigned this Mar 21, 2025
@MakisH
Copy link
Member Author

MakisH commented Mar 21, 2025

Closing for technical reasons (running system tests in a fork currently not provided). Opening a new PR.

@precice-bot
Copy link

This pull request has been mentioned on preCICE Forum on Discourse. There might be relevant details there:

https://precice.discourse.group/t/failing-to-compile-the-openfoam-adapter-at-moduleff-o/2240/5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants