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

ARPACK example driver gives different results from Matlab

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 3, 2014, 18:00
Default ARPACK example driver gives different results from Matlab
  #1
Member
 
Join Date: Feb 2011
Posts: 41
Rep Power: 15
jollage is on a distinguished road
Hi

Does anybody here know well ARPACK? I need your help.

I'm playing with ARPACK. I looked into the examples they provide, zndrv3.f, in the ARPACK/EXAMPLES/COMPLEX/ directory. I also came cross into NAG Fortran Library. In NAG, there are some linear-problem solvers F12***. The F12*** routines in NAG are equivalent to the znaupd in ARPACK. So I want to check if they will yield the same results.

I first looked into the example provided in the user guide of F12ARF at http://www.nag.co.uk/numeric/fl/nagd...F12/f12arf.pdf for example. In the end, it yields the results of

509.9390
380.9092
659.1558
271.9412

around the shift=500. I solved the same generalized eigenvalue problem in Matlab. Matlab gave the same results.

But when I used znaupd from ARPACK to solve the same problem, I obtained different answers. The 4 eigenvalues are now
rd1 = 501.65650188259684
rd2 = 480.15153312181440
rd3 = 526.52596256924164
rd4 = 461.99019999608828

The routines in NAG and ARPACK both use SHIFTED INVERSE mode and solve a generalized problem.
I'm not sure what was wrong. I attached my scripts for the ARPACK zndrv4.f (it's basically the same as the example file provided by ARPACK, I just need to change a little bit the matrices around line 174 to be the same as that in NAG.) and the Matlab file zndrv4.txt (you have to change the name to zndrv4.m).

Thanks a lot.

Update: The M matrix in F12ARF is normalized (entries divided by a six). I followed this and got the above wrong results in ARPACK. Now if I didn't divide the entries by six, the ARPACK script gives me the correct answer (the same as Matlab)........ So it's the problem of a 6? It seems ARPACK routine is not robust?
Attached Files
File Type: f zndrv4.f (16.9 KB, 2 views)
File Type: txt zndrv4.txt (422 Bytes, 1 views)

Last edited by jollage; December 3, 2014 at 19:44. Reason: Update
jollage 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
OpenFOAM - Validation of Results Ahmed OpenFOAM Running, Solving & CFD 10 May 13, 2018 18:28
Oscillating Airfoil Poor Results at High k (reduced frequency) dancfd OpenFOAM Running, Solving & CFD 3 November 4, 2013 08:32
Creating a tool to interpolate results Luis Batista OpenFOAM Running, Solving & CFD 2 April 11, 2013 08:15
How to create a shape in MATLAB greenfire Main CFD Forum 3 February 9, 2013 17:54
Transient Run - Output "Time" in partial results? evcelica CFX 2 May 16, 2012 21:36


All times are GMT -4. The time now is 14:56.