CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

faceI was not declared in this scope

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

Like Tree1Likes
  • 1 Post By marupio

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 31, 2011, 08:42
Default faceI was not declared in this scope
  #1
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 15
lindstroem is on a distinguished road
Hi everyone,

I am working on the dynamicAlphaContactAngle implementation. I got a modified version by a colleague which i tried to compile. I get the error: ‘faceI’ was not declared in this scope. He works in OF 1.7.1 and I tried to compile it in both, OF 1.6-ext and OF 1.7.1 - both did not work and stopped with the same error.

I also checked the header-files he includes, but there is no difference.. I also tried to include the faceI.H but then I get errors because of multiple defintions for some variables.

Is there anyone who might has an idea? Are there any information missing?

Greetings
lindstroem is offline   Reply With Quote

Old   May 31, 2011, 09:11
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 21
marupio is on a distinguished road
Contact your colleague: the code is incomplete. faceI is not a class, but it is typically used as a label variable when cycling through all the faces in the mesh. e.g.:

Code:
forAll(mesh.faces(), faceI)
{
    // Do something
}
marupio is offline   Reply With Quote

Old   May 31, 2011, 09:35
Default
  #3
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 15
lindstroem is on a distinguished road
Hi David,

thanks for your answer. The variable is used for a loop in a similar way as you wrote, thats correct. But what he send me is exactly what he implemented.
How would you get access to this variable if you would set up a "new" modification. To be more concrete: I am using the interFoam solver and the dynamicAlphaContactAngle BC. In the dynAlpCA implementation after the calculation of uwall I want to get the velocity gradient normal to the wall of the first cell. Therefore my colleague implemented a fct which he uses in a loop
Code:
forAll(gradUP, faceI) {etc}
where gradUP is
Code:
tensorField gradUP(size(), tensor::zero)
maybe this helps? Thank you very much in advance!
lindstroem is offline   Reply With Quote

Old   May 31, 2011, 09:50
Default
  #4
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 21
marupio is on a distinguished road
Hmmm... that's strange. The forAll() command is actually a macro, which does this:
Code:
forAll(objectName, indexName)
// is short for:
for (label indexName(0); indexName < objectName.size(); indexName++)
... so you see, the definition of faceI is inherent in the macro. I suspect you are not loading the header that contains the macro (UList.H, I think), or you have circular dependency in your include files.
kaifu likes this.
marupio is offline   Reply With Quote

Old   May 31, 2011, 10:09
Default
  #5
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 15
lindstroem is on a distinguished road
Hi David,

thanks again for the quick answer! I'll try to find the mistake but you already helped me a lot! Maybe I'll come back with new questions

happy foaming!
lindstroem 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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile calcMassFlowC aurore OpenFOAM Programming & Development 13 March 23, 2018 07:43
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
checking the system setup and Qt version vivek070176 OpenFOAM Installation 22 June 1, 2010 12:34
How to get the max value of the whole field waynezw0618 OpenFOAM Running, Solving & CFD 4 June 17, 2008 05:07
Compiling problems with hello worldC fw407 OpenFOAM Installation 21 January 6, 2008 17:38


All times are GMT -4. The time now is 09:17.