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

how to declare an array like: double Density_Grad_i[nDim]

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 19, 2014, 22:33
Default how to declare an array like: double Density_Grad_i[nDim]
  #1
Member
 
cean wang
Join Date: Feb 2013
Posts: 43
Rep Power: 13
ceanwang is on a distinguished road
Hi,

I'm trying to compile SU2V3 under win7@32 with MSVC2010express.

I have problem with numerics_direct_transition.cpp line 151 which is:
Code:
  double Density_Grad_i[nDim], Density_Grad_j[nDim], Conservative_Grad_i[nDim], Conservative_Grad_j[nDim];
  double Primitive_Grad_i[nDim], Primitive_Grad_j[nDim];
the compiler expected constant expression. So I changed it like this:
Code:
  double *Density_Grad_i, *Density_Grad_j;
  double *Conservative_Grad_i, *Conservative_Grad_j;
  double *Primitive_Grad_i,*Primitive_Grad_j;
  
  Density_Grad_i = new double [nDim];
  Density_Grad_j = new double [nDim]; 
  Conservative_Grad_i = new double [nDim];
  Conservative_Grad_j = new double [nDim];
  
  Primitive_Grad_i = new double [nDim];
  Primitive_Grad_j = new double [nDim];
and it passed.

And there are a few same situations in other cpp files.

After all the changes, I got an working su2_cfd.exe.

Hope it'll help.

Regards,

Cean

Last edited by ceanwang; January 22, 2014 at 20:39.
ceanwang is offline   Reply With Quote

Old   January 28, 2014, 16:14
Default
  #2
Member
 
Trent Lukaczyk
Join Date: Feb 2011
Location: Stanford, CA
Posts: 75
Rep Power: 15
rktchip is on a distinguished road
Great! And this was able to run a test case?
if you want you can submit a pull request to github and we'll try it out -
https://github.com/su2code/SU2
rktchip 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
Continuing User Defined Real Gas Model issues aeroman FLUENT 6 April 8, 2016 04:34
Sgimpi pere OpenFOAM 27 September 24, 2011 08:57
Ld_library_path scottneh OpenFOAM 9 November 21, 2009 10:15
Missing math.h header Travis FLUENT 4 January 15, 2009 12:48
REAL GAS UDF brian FLUENT 6 September 11, 2006 09:23


All times are GMT -4. The time now is 09:05.