cannot convert DataEntry to scalar
Hi,
I'm trying to modify a boundary condition, so I've started off with oscillatingFixedValue. I wanted this new boundary condition to be only for velocity so I've changed/removed all the template<class Type>. Now when I try to compile, it complains: Quote:
|
Because it is a template class and you basically need a special instance (vector), you have to replace Type by vector.
|
Have a look at the fixedNormalInletOutletVelocityFvPatchVectorField class. This might be a good starting point (if you want to specify the same velocity for all faces of your boundary patch).
|
Hassan: it is by default scalar not vector, (the same thing in the original boundary condition) hence the error <double>.
@Joachim: OscillatingFixedValue works fine for me, it's the autoPtr<DataEntry<scalar>> part that I haven't touched and complains after changes in non-related parts!!!! I solved the issue by commenting the member functions as the ->value() of the DataEntry part would've done the same thing. |
I did not mean in DataEntry. In your first post you said that your removed template<class Type> which mean you have to modify the entire class. Maybe I am not clear about your modifications.
|
Yep you're right, but the DataEntry part is not using template Type before I remove the template part. It's autoPtr<DataEntry<scalar>> from the very beginning, so I haven't touched it at all.
|
It is an interesting issue which may requires more investigation. I tried to reduce the template class to normal class and I get the same error. Actually this error make scene from the compiler point of view because ``frequency_`` for example is not scalar. Therefore the compiler complain about the return data type. For now, you can just remove these four function causing the error (if you don't need them) or change the return type. Also, you may consider using the template class as it is.
|
Yes that's what I did, commenting those lines.
But there's a new issue after that which I've been struggling. I'll make a new topic since it's a different issue. Thanks for following up. |
All times are GMT -4. The time now is 21:14. |