Archive for April, 2011

Recently, I tried to update an old Ubuntu 8.04 LTS system to 10.04 LTS.  Well, as easy as it could be, I clicked a few times, and it downloaded and installed a lot softwares, like 1500 or so. Then, it was time for a reboot, a one that turned into a very painful reboot !

After reboot, the boot menu was still the old one, exactly the old one. I pressed the normal boot. I knew that that kernel was perhaps removed. I was unfortunately right ! It asked for root password but could not even read key board !!! After another reboot, I tried recovery mode. This time, I had a terminal ! But soon I realized that the filesystem was mounted as read-only. That means I cannot change the menu.lst in the grub folder. I could see that the new kernel is there, I knew that I have to tell the system to boot via this kernel, but how?

After a couple of hours of nervous googling, I found the following trick: In the grub menu during boot, you can pres “e“, to edit the menu temporarily.  When you are done editing (press ENTER to finish editing), you can press “b” to boot with your altered settings. If you manage to boot into linux, you then have to alter the configuration permanently.  I changed the menu and put the correct name and rebooted. Not yet ! Again I edited the grub menu and this time put

at the end of the kernel line. After reboot, I enterred a filesystem check by force. After that, everything worked fine, exactly everything.

It had happened to me that I end up an upgrade with no graphics but having filesystem as read-only was really bad.

Never forget a backup before system upgrade !

Read Full Post »

A word on PDEs

So far, we discussed very simple problems. From now one, we want to simulate some simple problems, e.g., the diffusion equation. For this reason, I would like to have a very short discussion on the PDEs. I refer the interested reader to chapter 19 of Numerical Recipes.

Partial differential equations are at the heart of many, if not most, computer analysis or simulations of continuous physical systems, such as fluids, electromagnetic fields, etc. In most mathematics books, partial differential equations (PDEs) are classified into the three categories, hyperbolic, parabolic, and elliptic, on the basis of their characteristics, or curves of information propagation. The prototypical example of a hyperbolic equation is the one-dimensional wave equation

where v = constant is the velocity of wave propagation. The prototypical parabolic equation is the diffusion equation

where D is the diffusion coefficient.

The prototypical elliptic equation is the Poisson equation

where the source term ρ is given. If the source term is equal to zero, the equation is Laplace’s equation. From a computational point of view, the classification into these three canonical

From a computational point of view, the classification into these three canonical types is not very meaningful. The first two equations both define initial value or Cauchy problems: If information on u (perhaps including time derivative information) is given at some initial time t0 for all x, then the equations describe how u(x, t) propagates itself forward in time. In other words, these two equations describe time evolution. The goal of a numerical code should be to track that time evolution with some desired accuracy. In initial value problems, one’s principal computational concern must be the stability of the algorithm. Many reasonable- looking algorithms for initial value problems just don’t work — they are numerically unstable.

By contrast, the third equation directs us to find a single “static” function u(x, y) which satisfies the equation within some (x, y) region of interest, and which — one must also specify — has some desired behavior on the boundary of the region of interest. These problems are called boundary value problems. In contrast to initial value problems, stability is relatively easy to achieve for boundary value problems. Thus, the efficiency of the algorithms, both in computational load and storage requirements, becomes the principal concern.

Read Full Post »