Porting foundation->ESI: "‘area’ is not a member of ‘Foam::face’"
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’: 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 Thanks, Mike |
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... |
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 |
If you already have a face, just use its mag() method
https://develop.openfoam.com/Develop...ce/face.H#L221 |
All times are GMT -4. The time now is 16:50. |