CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

error: 'Foam::T' does not have class type

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 20, 2012, 20:25
Default error: 'Foam::T' does not have class type
  #1
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 5
Raymond.Leoi is on a distinguished road
double ptr_temp[OF_nCells];
for (int i=0; i<OF_nCells; i++)
ptr_temp[i] = T.field()[i];

The above is working well in OpenFOAM 1.5. But it doesn't work in OF 1.7 and an error occurs as,
solver_data.H:8:18: error: 'Foam::T' does not have class type

any idea about this problem?
Raymond.Leoi is offline   Reply With Quote

Old   February 21, 2012, 03:36
Default
  #2
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 7
kathrin_kissling is on a distinguished road
Hi,

can you give us a hint on how T is defined?

Thanks

Kathrin
kathrin_kissling is offline   Reply With Quote

Old   February 21, 2012, 16:32
Default
  #3
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,873
Blog Entries: 34
Rep Power: 78
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Greetings to all!

Indeed, more information would clearly make it easier to help! Usually there are two kinds of "T" on OpenFOAM applications:
  • Foam::T - this transposes a matrix.
  • ::T - this is the Temperature field defined on a solver.
Solution: don't expect the compiler to do voodoo Because if it does do voodoo, then you're probably in a whole lot of trouble...

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   February 22, 2012, 03:22
Default
  #4
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 7
kathrin_kissling is on a distinguished road
Hi Bruno,
do you think it got mixed up?
T.field() instead of field.T()

possible....

Best
Kathrin
kathrin_kissling is offline   Reply With Quote

Old   February 22, 2012, 04:36
Default
  #5
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,873
Blog Entries: 34
Rep Power: 78
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Kathrin,

I'm almost betting on it being that issue. I saw this problem a week or so ago, where we were basing ourselves on the discontinued Programmers Guide and came to the conclusion that "Foam::T" was a must on an equation, because the "T" field already existed.
Actually, I'm not even sure if "field.T()" still exists...

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pressure instability with rhoSimpleFoam daniel_mills OpenFOAM Running, Solving & CFD 44 February 17, 2011 18:08
boundary conditions for simpleFoam calculation foam_noob OpenFOAM Running, Solving & CFD 7 March 3, 2010 21:17
Flow Around a Cylinder ronaldo OpenFOAM 5 September 18, 2009 08:13
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30


All times are GMT -4. The time now is 00:31.