|
[Sponsors] |
Porting foundation->ESI: "‘area’ is not a member of ‘Foam::face’" |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 28, 2021, 04:28 |
Porting foundation->ESI: "‘area’ is not a member of ‘Foam::face’"
|
#1 |
Member
Mike Worth
Join Date: Jun 2019
Posts: 45
Rep Power: 6 |
I'm trying to port some code from the OpenFOAM-Dev github repository to work with my ESI installation.
Upon running wmake it's thrown two errors - one was easily fixed by substituting "vSmall" for "VSMALL", which I did by comparing equivalent files and noticing that the only difference was the capitalisation. Unfortunately the other error seems to be less easily fixed. It's complaining about the following: Code:
MPLIC/MPLICfaceI.H: In member function ‘const vector Foam::MPLICface::Sf() const’: MPLIC/MPLICfaceI.H:117:18: error: ‘area’ is not a member of ‘Foam::face’ return face::area(subPoints_); ^~~~ Unfortunately my optimistic 'swap them over' didn't work - it produces this error: Code:
MPLIC/MPLICfaceI.H:117:39: error: cannot call member function ‘Foam::vector Foam::face::areaNormal(const Foam::UList<Foam::Vector<double> >&) const’ without object return face::areaNormal(subPoints_); ^ Thanks, Mike |
|
April 28, 2021, 09:12 |
|
#2 |
Member
Mike Worth
Join Date: Jun 2019
Posts: 45
Rep Power: 6 |
I've been doing some further digging, and it looks like there are two different area() functions in the foundation version of face.H - one static and one member. It seems that actually it's the static one that the MPLICfaceI code is trying to use; unfortunately the ESI version of face.H doesn't really have anything in terms of static functions. This would (I think) fit with the second error in my post above, in that it falls-back to a member function when the context only works with a static one.
It's unclear to me why only the foundation fork has the static one, and if a simple change can make the MPLIC code use the member one instead of the static. I could of course also be barking up the wrong tree and it's actually using the member one anyway and I've screwed something else up... |
|
April 28, 2021, 11:59 |
|
#3 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 14 |
A quick look at the ESI code and this comment pops up :
Code:
//- The area normal - with magnitude equal to area of face Code:
return mag(face::areaNormal(subPoints_)) Caelan
__________________
Public git repository : https://github.com/clapointe2011/public |
|
May 3, 2021, 13:42 |
|
#4 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,686
Rep Power: 40 |
If you already have a face, just use its mag() method
https://develop.openfoam.com/Develop...ce/face.H#L221 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Native ParaView Reader Bugs | tj22 | ParaView | 270 | January 4, 2016 11:39 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 10:23 |
Compilation errors in ThirdPartymallochoard | feng_w | OpenFOAM Installation | 1 | January 25, 2009 06:59 |
OpenFoam 14 installation problem | gfcoppola | OpenFOAM Installation | 20 | November 2, 2007 13:38 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 17:51 |