Problem with pos() or Scalar.H
I am trying to calculate the size of a wave segment.
Herefore I use
This is the error message I get
But the Scalar.H file seems fine to me, is there any known problem with it?
I am using Scalar.H because pos() is declared in it.
Also I think the last error that } is missing is also related to that... cuz it disappears if I comment out the include Scalar.H
Is anyone able to make more sense of it?
I am happy about any suggestions. Thanks :)
Works for me. Post up the simplest test case you have. What version of OF are you using?
I am using OF 2.0.0
I have had a look... even a Solver which is perfectly working doesnt compile anymore if I add the simple line
I have attached the file if you want to have a look at it...
I am really confused.
Thank you for your help.
Ok, don't include Scalar.H, it will compile fine. Scalar.H contains template specialisations for type Scalar. If you're interested have a look at http://www.cantrip.org/traits.html.
Yea the compilation works.
But I have a problem which I had before. The pos(u-1e-12) gives me values either 0 or 1 depending whether u>1e-12.
Which is good :)
But by doing
I encountered this problem before, that's why i figured I might need Scalar.H for a proper pos() function.
My domain is a block of size 1000 * 1000 * 0.1
therefore the 90000 isnt even the size of my domain...
Any idea why I get this constant value?
Well S will be a field of 1s and 0s. You're then integrating, which will mean you sum all the 1s multiplied by the size of the volume they are in.
Do it on a simpler field with a much smaller size that you know should give you a specific answer.
You are right. I got confused due to the complexity of my field. Thanks for the hints :)
|All times are GMT -4. The time now is 09:01.|