CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[waves2Foam] Errors in compiling waves2Foam on OpenFOAMv1906

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By josephchou

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 9, 2019, 22:26
Default Errors in compiling waves2Foam on OpenFOAMv1906
  #1
New Member
 
Zhou Zhang
Join Date: Jan 2019
Location: Ann Arbor, Michigan
Posts: 3
Rep Power: 2
josephchou is on a distinguished road
When I try to install waves2foam on OpenFOAMv1906, there is an error message:

Quote:
postProcessing/postProcessingWaves/spectralAnalysis/spectralMethods/complexExp.C:31:15: error: redefinition of ‘Foam::complex Foam::exp(const Foam::complex&)’
Foam::complex Foam::exp( const Foam::complex& C )
^~~~
In file included from /home/joezhang/OpenFOAM/OpenFOAM-v1906/src/OpenFOAM/lnInclude/complex.H:372,
from postProcessing/postProcessingWaves/spectralAnalysis/spectralMethods/complexExp.H:39,
from postProcessing/postProcessingWaves/spectralAnalysis/spectralMethods/complexExp.C:27:
/home/joezhang/OpenFOAM/OpenFOAM-v1906/src/OpenFOAM/lnInclude/complexI.H:404:11: note: ‘Foam::complex Foam::exp(const Foam::complex&)’ previously defined here
transFunc(exp)
^~~
/home/joezhang/OpenFOAM/OpenFOAM-v1906/src/OpenFOAM/lnInclude/complexI.H:398:20: note: in definition of macro ‘transFunc’
inline complex func(const Foam::complex& z) \
^~~~
postProcessing/postProcessingWaves/spectralAnalysis/spectralMethods/complexExp.C: In function ‘Foam::complex Foam::exp(const Foam::complex&)’:
postProcessing/postProcessingWaves/spectralAnalysis/spectralMethods/complexExp.C:33:39: error: ‘zero’ is not a member of ‘Foam::complex’
Foam::complex res( Foam::complex::zero );
^~~~
make: *** [Make/linux64GccDPInt32Opt/postProcessing/postProcessingWaves/spectralAnalysis/spectralMethods/complexExp.o] Error 1
Does anyone know what the problem is and how to fix it? Thanks!
Kevin Cao likes this.
josephchou is offline   Reply With Quote

Old   September 22, 2019, 16:36
Default
  #2
HPE
New Member
 
Herpes Free Engineer
Join Date: Sep 2019
Posts: 25
Rep Power: 2
HPE is on a distinguished road
Quote:
Originally Posted by josephchou View Post
When I try to install waves2foam on OpenFOAMv1906, there is an error message:



Does anyone know what the problem is and how to fix it? Thanks!
Hi,

You cannot have two definitions of the same function. It seems the new OpenFOAM version added new functions for complex type objects which already exist in waves2foam.

Is it possible to modify waves2foam to remove Foam::complex exp() thereat?

In new version of waves2foam, there might be refactoring in their code, so that this duplication can be removed. Is it possible for you to issue a bug ticket in waves2foam?
__________________
Kind regards,
HPE
HPE is offline   Reply With Quote

Old   September 23, 2019, 20:24
Default
  #3
New Member
 
Zhou Zhang
Join Date: Jan 2019
Location: Ann Arbor, Michigan
Posts: 3
Rep Power: 2
josephchou is on a distinguished road
Quote:
Originally Posted by HPE View Post
Hi,

You cannot have two definitions of the same function. It seems the new OpenFOAM version added new functions for complex type objects which already exist in waves2foam.

Is it possible to modify waves2foam to remove Foam::complex exp() thereat?

In new version of waves2foam, there might be refactoring in their code, so that this duplication can be removed. Is it possible for you to issue a bug ticket in waves2foam?
Hi,

Thank you for your reply! I understand that the error was coming from the redefinition of an existing function in the new version of OpenFOAM.

I have checked the waves2foam website on OpenFOAMWiki (https://openfoamwiki.net/index.php/Contrib/waves2Foam) and found in the source code history that even the newest version of waves2foam has not been compatible with OpenFOAMv1906 yet. So it is reasonable that such error occurs. Now I have turned to an older version of OpenFOAM and the installation of waves2foam went well.

Thanks,
Zhou
josephchou is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use PIMPLE properly? floquation OpenFOAM Running, Solving & CFD 22 February 28, 2019 06:44
p_rgh initial residual no change with different settings manuc OpenFOAM Running, Solving & CFD 3 June 26, 2018 15:53
courant number increases to rather large values 6863523 OpenFOAM Running, Solving & CFD 13 May 28, 2018 21:33
compiling error(s) in a modified twoPhaseEulerFoam solver foamer OpenFOAM 14 June 20, 2014 08:51
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 03:34


All times are GMT -4. The time now is 10:44.