Question: Please solve this problem using Matlab. Please show the modified code to get to the answers. Thanks in advance!! CP 6 [ 6 marks ]

Please solve this problem using Matlab. Please show the modified code to get to the answers. Thanks in advance!!
CP6[6 marks] Consider the complex Ginzburg Landau (GL) equation
ut=grad2u+u-u|u|2,
which arises in superconductor theory, quantum theory, and string theory. In this problem we aim to solve this GL
equation in the box -1x,y1 with periodic boundary conditions in space and white noise as an initial condition.
Using a finite difference approximations of ut and gradu, we arrive at the semi-implicit discretisation
un+1-unt=-h2Aun+1+un+1-un|un|2
where A is a suitably scaled version of the Poisson matrix. Notice we are treating the linear parts implicitly and the
nonlinear parts explicitly, which provides a good balance of stability and efficiency.
Starting from the initial condition u0, we must solve at each time step
Bun+1=N(un), where B=(1-t)I+th2A and N(u)=-u|u|2.
The code below
implements this method for a a certain choice of parameters ,, and t, with
N=100. Howevever, the code is inefficient and too slow.
(a) Modify the code to improve it as best you can, using a built-in direct method to solve any required linear systems of
equations. (Hints: Consider sparsity, factorisations, and block operators.) Show your computing at t=10 and report on
both the original and improved timings to compute it.
(b) Repeat (a), but now using a suitable iterative method to solve the linear systems. Compare with the timings from (a).
Hint: It's very easy to make the code fast if you are willing to get a nonsense answer! This solutions using your modified
code should look at least qualitatively similar to those in the original version. If they don't, that's a good indication that
you've done something wrong!
 Please solve this problem using Matlab. Please show the modified code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!