1 / 2

CSE245 Lab 3

CSE245 Lab 3. In this lab we will use KLU ( klu ), GMRES ( gmres ) and Preconditioned Conjugate Gradients ( pcg ) methods in Matlab to solve four circuit matrices* and compare the results. Setup: ssh to cselab1.ucsd.edu and execute the following commands: cp /home/hepeng/cse245_lab3.tar.gz .

landry
Télécharger la présentation

CSE245 Lab 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSE245 Lab 3 • In this lab we will use KLU (klu), GMRES (gmres) and Preconditioned Conjugate Gradients (pcg) methods in Matlab to solve four circuit matrices* and compare the results. • Setup: • ssh to cselab1.ucsd.edu and execute the following commands: • cp /home/hepeng/cse245_lab3.tar.gz . • tar xvzf cse245_lab3.tar.gz • cd cse245_lab3 • matlab & • Generate a random right hand side b for the matrices. For example, run the following commands in Matlab: • %load matlab file scircuit.mat • load scircuit; • A = Problem.A; • % generate RHS • b = sum(A,2); • % solve Ax = b • ….. • ….. * Matrix Source: http://www.cise.ufl.edu/research/sparse/matrices/

  2. CSE245 Lab 3 • Before you start, please read the matlab reference pages for these solvers. (Type doc klu or doc gmres or doc pcg in Matlab to access these reference pages) • Use ILU (luinc) as preconditioner for GMRES and PCG. • Do not use PCG unless the matrix is symmetric and positive definite. • It is suggested that you read and run the KLU demo in Matlab: • edit /home/hepeng/klu/KLU/MATLAB/klu_demo.m • For more information about KLU: • http://cseweb.ucsd.edu/classes/fa04/cse245/notes/KLU.pdf • http://www.cise.ufl.edu/research/sparse/klu/ • Tune input parameters for each solver and try to get the best runtime** results. • Deliverable: • A Matlab script that reads the circuit matrices and calls klu/gmres/pcg to solve the matrices. • A report that compares the runtime of these three different solvers. Explain the runtime difference. ** Run doc cputime in Matlab

More Related