|
[Sponsors] |
|
May 31, 2011, 08:42 |
faceI was not declared in this scope
|
#1 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 15 |
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 |
|
May 31, 2011, 09:11 |
|
#2 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
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 } |
|
May 31, 2011, 09:35 |
|
#3 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 15 |
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} Code:
tensorField gradUP(size(), tensor::zero) |
|
May 31, 2011, 09:50 |
|
#4 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
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++) |
|
May 31, 2011, 10:09 |
|
#5 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 15 |
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! |
|
|
|
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 |