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

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

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 20, 2012, 19:25
Default error: 'Foam::T' does not have class type
  #1
Member
 
Join Date: Feb 2012
Posts: 59
Rep Power: 14
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, 02:36
Default
  #2
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 17
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, 15:32
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
elham usefi and nepomnyi like this.
__________________
wyldckat is offline   Reply With Quote

Old   February 22, 2012, 02:22
Default
  #4
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 17
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, 03:36
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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


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
boundary conditions for simpleFoam calculation foam_noob OpenFOAM Running, Solving & CFD 8 July 1, 2015 08:07
Pressure instability with rhoSimpleFoam daniel_mills OpenFOAM Running, Solving & CFD 44 February 17, 2011 17:08
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 20:30


All times are GMT -4. The time now is 16:43.