<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8652939</id><updated>2011-07-31T03:49:22.312+02:00</updated><category term='diff'/><category term='color'/><category term='utility'/><category term='svn'/><title type='text'>The Adapter</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://arthurvd.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://arthurvd.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/12162627333168336969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8652939.post-423732573028297854</id><published>2008-04-29T14:39:00.007+02:00</published><updated>2008-04-29T15:42:31.866+02:00</updated><title type='text'>Correctly reset LaTeX's theorem counters</title><content type='html'>&lt;p&gt;
Now that's a technical title to start with! Let's keep this short: I've gotten the following question a few times already. When numbering theorems (either standard LaTeX or by package &lt;span style="font-family:lucida grande;"&gt;amsthm&lt;/span&gt;) within sections (or deeper levels), the counter is not correctly reset when starting a new chapter (or in fact any level above your numbering level).
&lt;/p&gt;&lt;p&gt;
&lt;span style="font-weight: bold;"&gt;Example:&lt;/span&gt;&lt;br/&gt;
&lt;pre&gt;\newtheorem{lemma}{Lemma}[section]

\chapter{First chap}
\section{First sec}
\begin{lemma}that's the one\end{lemma}

\chapter{Second chap}
\begin{lemma}This number is wrong.\end{lemma}
\section{Next sec}
\begin{lemma}Now it's OK again.\end{lemma}

&lt;/pre&gt;
Will produce:&lt;br/&gt;
&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Chapter 1 First chap
&lt;/span&gt;
&lt;/span&gt;&lt;br/&gt;
&lt;span style="font-weight: bold;"&gt;1.1 First sec&lt;/span&gt;&lt;br/&gt;
&lt;span style="font-weight: bold;"&gt;Lemma 1.1.1&lt;/span&gt; That's the one&lt;br/&gt;

&lt;span style="font-weight: bold;font-size:130%;" &gt;Chapter 2 Second chap&lt;/span&gt;&lt;br/&gt;
&lt;span style="font-weight: bold;"&gt;Lemma 2.0.2&lt;/span&gt; This number is wrong.&lt;br/&gt;
&lt;br/&gt;
&lt;span style="font-weight: bold;"&gt;2.1 Next sec&lt;/span&gt;&lt;br/&gt;
&lt;span style="font-weight: bold;"&gt;Lemma 2.1.1&lt;/span&gt; Now it's OK again.&lt;br/&gt;

&lt;p&gt;
Notice how the theorem counter did not get reset when entering the second chapter. It is &lt;span style="font-style: italic;"&gt;only&lt;/span&gt; reset when entering a new section. Of course, I know that the zero is ugly, but apparantly some people really &lt;span style="font-style: italic;"&gt;do&lt;/span&gt; want to include theorems in a chapter even before the first section has started.
&lt;/p&gt;&lt;p&gt;
&lt;span style="font-weight: bold;"&gt;Fix:&lt;/span&gt;&lt;br/&gt;
In your document preamble (&lt;span style="font-style: italic;"&gt;after&lt;/span&gt; the &lt;code&gt;\newtheorem&lt;/code&gt;), put the following:
&lt;pre&gt;
\makeatletter
\@addtoreset{lemma}{chapter}
\makeatother
&lt;/pre&gt;
&lt;/p&gt;&lt;p&gt;
Note that this is only necessary for document classes report and book. When you are numbering within, e.g., subsection, also add a &lt;code&gt;\@addtoreset{lemma}{section}&lt;/code&gt;. You'll get the idea.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8652939-423732573028297854?l=arthurvd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arthurvd.blogspot.com/feeds/423732573028297854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8652939&amp;postID=423732573028297854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/423732573028297854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/423732573028297854'/><link rel='alternate' type='text/html' href='http://arthurvd.blogspot.com/2008/04/correctly-reset-latexs-theorem-counters.html' title='Correctly reset LaTeX&apos;s theorem counters'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/12162627333168336969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8652939.post-1977299950748739620</id><published>2007-05-24T14:37:00.000+02:00</published><updated>2007-05-24T15:05:40.823+02:00</updated><title type='text'>Two minor editor enhancements</title><content type='html'>Only for BibTeX and NEdit users: you probably know that the bibliography style often lowercases your texts for titles. This is not what you want in the following case:
&lt;blockquote&gt;An hllc riemann solver for magneto-hydrodynamics&lt;/blockquote&gt;
You need to put braces around parts that should not be changed, i.e., in BibTeX form:
&lt;blockquote&gt;&lt;code&gt;An {HLLC} {R}iemann solver for magneto-hydrodynamics&lt;code&gt;&lt;/blockquote&gt;

Put the following &lt;span style="color: rgb(51, 51, 255);"&gt;piece of code&lt;/span&gt; in your &lt;code&gt;~/.nedit/nedit.rc&lt;/code&gt; configuration file for NEdit.
&lt;pre&gt;
nedit.macroCommands: \
&lt;span style="font-style: italic; color: gray;"&gt;...many built-in macros...
      }\n\&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;
      BibTeX capitalise:Shift+Ctrl+U:c:R: {\n\
              replace_in_selection("([A-Z]+)", "\\\\{\\\\1\\\\}", "regex")\n\
      }\n&lt;/span&gt;
nedit.bgMenuCommands: \
&lt;/pre&gt;
After typing a title, just select it and press &lt;code&gt;[Ctrl]+[Shift]+[U]&lt;/code&gt;. It will enclose all uppercase parts inside braces.
Not much special about it, but handy it is.

Oh, and whilst you have your configuration file open, also add this:
&lt;pre&gt;
        Comments&gt;% Comment@LaTeX:Shift+Ctrl+C:c:R: {\n\
                replace_in_selection("^.*$", "%&amp;", "regex")\n\
        }\n\
        Comments&gt;% Uncomment@LaTeX:Shift+Ctrl+Alt+C:u:R: {\n\
                replace_in_selection("(^[ \\\\t]*%)(.*)$", "\\\\2", "regex")\n\
        }\n\
&lt;/pre&gt;
When editing a LaTeX file, select some complete lines, press &lt;code&gt;[Shift]+[Ctrl]+[C]&lt;/code&gt; and you'll have the entire block commented by &lt;code&gt;%&lt;/code&gt; characters. Include the &lt;code&gt;[Alt]&lt;/code&gt;-key to uncomment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8652939-1977299950748739620?l=arthurvd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arthurvd.blogspot.com/feeds/1977299950748739620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8652939&amp;postID=1977299950748739620' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/1977299950748739620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/1977299950748739620'/><link rel='alternate' type='text/html' href='http://arthurvd.blogspot.com/2007/05/two-minor-editor-enhancements.html' title='Two minor editor enhancements'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/12162627333168336969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8652939.post-694976026135815539</id><published>2007-04-26T11:09:00.001+02:00</published><updated>2007-04-26T11:53:11.962+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='color'/><category scheme='http://www.blogger.com/atom/ns#' term='diff'/><category scheme='http://www.blogger.com/atom/ns#' term='utility'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>Colorize your (svn) diffs</title><content type='html'>&lt;p&gt;People who know me, know that I love color on my computer screen&lt;a href="#note-tc"&gt;&lt;sup&gt;[1]&lt;/sup&gt;&lt;/a&gt;. It helps me reading code or output faster. I was not on a &lt;a href="http://arthurvd.blogspot.com/2004/11/zijpaadjes.html"&gt;side track&lt;/a&gt; today, no, but when cleaning up my &lt;code&gt;~/bin&lt;/code&gt;, I just thought that my tiny &lt;code&gt;colordiff&lt;/code&gt; script may be useful to others too. It (modestly) colorizes output from &lt;code&gt;svn diff&lt;/code&gt;, or plain &lt;code&gt;diff&lt;/code&gt; output.
&lt;/p&gt;
&lt;p&gt;Here is an example of &lt;code&gt;svn diff&lt;/code&gt; on a directory with some modified files:&lt;/p&gt;
&lt;pre&gt;
&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;[dam@doffer:~/avandam_svn/phd/sw/fortran/src]$&lt;/span&gt; svn diff . | colordiff
&lt;span style="background: black none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;color:white;" &gt;Index: mmadapt.f&lt;/span&gt;
===================================================================
&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;--- mmadapt.f   (revision 1114)&lt;/span&gt;
&lt;span style="font-weight: bold; color: rgb(51, 102, 255);"&gt;+++ mmadapt.f   (working copy)&lt;/span&gt;
@@ -429,8 +429,8 @@
subroutine eval_monitor
    integer :: i1, i2, iq, id
    real(knd_double) :: alphap(nq, ndim)
&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;-       call eval_monitor_nondir&lt;/span&gt;
&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;-       return&lt;/span&gt;
&lt;span style="font-weight: bold; color: rgb(51, 102, 255);"&gt;+       !call eval_monitor_nondir&lt;/span&gt;
&lt;span style="font-weight: bold; color: rgb(51, 102, 255);"&gt;+       !return&lt;/span&gt;

    call cellaverages(x, x, xc) ! I use this result in move_mesh too!

&lt;span style="background: black none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;color:white;" &gt;Index: mmsolve.f&lt;/span&gt;
&lt;span style="font-style: italic;"&gt;[..]&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;You can also use this on normal &lt;code&gt;diff&lt;/code&gt; output:
&lt;/p&gt;&lt;pre&gt;
&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;[dam@doffer:~/avandam_svn/phd/sw/fortran/src]$&lt;/span&gt; diff mmadapt.f mmadapt_bla.f | colordiff plain
466c466
&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;&amp;lt;               end do ! i2&lt;/span&gt;
---
&lt;span style="font-weight: bold; color: rgb(51, 102, 255);"&gt;&amp;gt;               end do ! i2 foo&lt;/span&gt;
485d484
&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;&amp;lt;               dq(i1,i2,1:nq,1) = (q(i1+1,i2,1:nq) - q(i1-1,i2,1:nq)) / (xc(i1+1,i2,1) - xc(i1-1,i2,1))&lt;/span&gt;
503a503
&lt;span style="font-weight: bold; color: rgb(51, 102, 255);"&gt;&amp;gt;       ! bla&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;colordiff&lt;/code&gt; script only uses &lt;code&gt;&lt;a href="http://www.gnu.org/software/sed/"&gt;sed&lt;/a&gt;&lt;/code&gt; and looks like this:
&lt;/p&gt;
&lt;pre&gt;
#!/bin/bash
# Mainly used to pipe output by 'svn diff' into
if [[ "$1" == "plain" ]] ; then # to use in plain diff usage
        sed -e 's/^\(&gt;.*\)/ESC[1;34m\1ESC[0m/;s/^\(&lt;.*\)/ESC[1;31m\1ESC[0m/;s/^\(diff .*\)/ESC[1;37;40m\1ESC[0m/'
else # for svn diff output
        sed -e 's/^\(\+.*\)/ESC[1;34m\1ESC[0m/;s/^\(\-.*\)/ESC[1;31m\1ESC[0m/;s/^\(Index: .*\)/ESC[1;37;40m\1ESC[0m/'
fi
&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;sed&lt;/code&gt; just inserts the appropriate escape characters producing color output&lt;a href="#note-esc"&gt;&lt;sup&gt;[2]&lt;/sup&gt;&lt;/a&gt; at the right places. To make sure the escape characters are correct do not copy-paste, but &lt;a href="http://www.math.uu.nl/people/dam/dl/tools/colordiff"&gt;download colordiff here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size:85%;"&gt;[1] &lt;a name="note-tc"&gt;&lt;/a&gt;&lt;a href="http://www.stratego-language.org/Stratego/StrategoMisc"&gt;color output for Stratego&lt;/a&gt;.&lt;br/&gt;
[2] &lt;a name="note-esc"&gt;&lt;/a&gt;&lt;a href="http://www.linuxjournal.com/article/8603"&gt;Escape characters producing color output&lt;/a&gt;.
&lt;/span&gt;

&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8652939-694976026135815539?l=arthurvd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arthurvd.blogspot.com/feeds/694976026135815539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8652939&amp;postID=694976026135815539' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/694976026135815539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/694976026135815539'/><link rel='alternate' type='text/html' href='http://arthurvd.blogspot.com/2007/04/colorize-your-svn-diffs_26.html' title='Colorize your (svn) diffs'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/12162627333168336969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8652939.post-9094739662968222482</id><published>2007-04-25T12:12:00.000+02:00</published><updated>2007-04-25T15:13:34.113+02:00</updated><title type='text'>The Ultimate Coolness of Signal Catching</title><content type='html'>&lt;p&gt;Patience is a virtue, but I seem to be lacking it. I often perform long computer simulations and continue working on my code when the program runs in a different window. The end result of the simulation is some data files containing the final solution.&lt;br/&gt;
What a waste of resources, however, when the simulation ends and it turns out to have become unstable in an early stage already, producing senseless data all the time. Or, imagine you really have to leave the office and want to take your laptop home, but the simulation is still only halfway. Pressing Ctrl-C is easy, but you'll have to start the simulation from the start again at home. I would like to save solution data at any intermediate time.&lt;br/&gt;
I decided to have a look at the use of UNIX &lt;a href="http://en.wikipedia.org/wiki/Signal_%28computing%29"&gt;signals&lt;/a&gt; to solve these little annoyances.
&lt;/p&gt;
&lt;p&gt;
The idea is neither original, nor very difficult; it's just extremely handy! Most of my simulations consist of a large loop in the main routine that starts at simulation time &lt;span style="font-style: italic;"&gt;T&lt;/span&gt;&lt;sub&gt;start&lt;/sub&gt; and ends at time  &lt;span style="font-style: italic;"&gt;T&lt;/span&gt;&lt;sub&gt;end&lt;/sub&gt;, taking small time steps. Here's sample terminal output to get an idea:
&lt;/p&gt;
&lt;pre&gt;
[..]
#        1967  time =   0.1986020
finished MM after            2  steps (mmres=  9.5645049E-006 ).
#        1968  time =   0.1986853
finished MM after            2  steps (mmres=  9.8183985E-006 ).
[..]
&lt;/pre&gt;
&lt;p&gt;When I press Ctrl-Z ('suspend'), this is what happens:
&lt;/p&gt;
&lt;pre&gt;
finished MM after            2  steps (mmres=  9.7805565E-006 ).
#        2594  time =   0.2427970  &lt;span style="font-style: italic;"&gt;(Ctrl-Z pressed)&lt;/span&gt;
Caught suspend. Saving current data...
Continuing execution...
finished MM after            2  steps (mmres=  9.9850709E-006 ).
#        2595  time =   0.2428664
&lt;/pre&gt;
&lt;p&gt;
And when I press Ctrl-C ('interrupt'), this is what happens:
&lt;/p&gt;
&lt;pre&gt;
finished MM after            5  steps (mmres=  1.0567982E-005 ).
#        2617  time =   0.2444400 &lt;span style="font-style: italic;"&gt;(Ctrl-C pressed)&lt;/span&gt;
&lt;code&gt;Caught interrupt. Saving current data...
Exiting.
&lt;/pre&gt;
&lt;p&gt;
Note that I deliberately use the SIGINT (Ctrl-C) and SIGTSTP (Ctrl-Z) signals, because those are sent when pressing the stated key combinations. The reserved user signals SIGUSR1 and SIGUSR2 would have to be sent for example by the &lt;code&gt;kill&lt;/code&gt; command, which is inconvenient for my use.
&lt;/p&gt;
&lt;h4&gt;Implementation in Fortran&lt;/h4&gt;
&lt;p&gt;On UNIX systems, signal handling is performed by the functions defined in the system-wide (C-)library &lt;code&gt; signal.h&lt;/code&gt;. Fortunately &lt;a href="http://nxg.me.uk/dist/sigwatch/"&gt;libsigwatch&lt;/a&gt; provides some basic but sufficient helper functions that allows us to define which signals we want to catch, and what special action should be taken.
&lt;/p&gt;
&lt;p&gt;
Here is my relevant Fortran (95) source code:
&lt;/p&gt;
&lt;pre&gt;
&lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;module&lt;/span&gt; mmsignal
&lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;use&lt;/span&gt; mmio

&lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;contains&lt;/span&gt;

&lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;subroutine&lt;/span&gt; initsighandles()
  integer  watchsignal
  integer :: status
  status = watchsignal(2) &lt;span style="font-style: italic;"&gt;! SIGINT (Ctrl-C)&lt;/span&gt;
  status = watchsignal(20) &lt;span style="font-style: italic;"&gt;! SIGTSTP (Ctrl-Z)&lt;/span&gt;
  &lt;span style="font-style: italic;"&gt;! Optionally check for status == -1 to detect failure&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;end subroutine&lt;/span&gt;

&lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;subroutine&lt;/span&gt; catchsignals()
  integer getlastsignal
  integer :: lastsig

  lastsig = getlastsignal()

  &lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;if&lt;/span&gt; (lastsig .eq. 2) &lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;then&lt;/span&gt;
    print *, 'Caught interrupt. Saving current data...'
    &lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;call&lt;/span&gt; save_state
    print *, 'Exiting.'
    stop
  &lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;end if&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;if&lt;/span&gt; (lastsig .eq. 20) &lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;then&lt;/span&gt;
    print *, 'Caught suspend. Saving current data...'
    &lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;call&lt;/span&gt; save_state
    print *, 'Continuing execution...'
  &lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;end if&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;end subroutine&lt;/span&gt;

&lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;end module&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;
The routine &lt;code&gt;watchsignal(int)&lt;/code&gt; installs special signal handling for the requested signal: each time the signal is received, it is stored in a variable accessible by calling the routine &lt;code&gt;getlastsignal()&lt;/code&gt;. The custom signal handler itself is &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; handled by the sigwatch library: I call my own routine &lt;code&gt;catchsignals()&lt;/code&gt; within the main loop's body that checks whether the most recent signal was either SIGINT or SIGTSTOP, and if not just does nothing.
&lt;/p&gt;
&lt;p&gt;
To include the sigwatch library in your program, just add it to your linking stage and you are done:
&lt;/p&gt;
&lt;pre&gt;
&gt; gfortran &lt;span style="color: rgb(204, 0, 0);"&gt;-lsigwatch&lt;/span&gt; finvol.o mmadapt.o mmbounds.o mmconfig.o mmdata.o mmio.o mmphys.o &lt;span style="color: rgb(204, 0, 0);"&gt;mmsignal.o&lt;/span&gt; mmsolve.o mmusr.o -o mmsolve
&lt;/pre&gt;
&lt;p&gt;(Relevant parts are &lt;span style="color: rgb(204, 0, 0);"&gt;highlighted&lt;/span&gt;.)
&lt;/p&gt;
&lt;h4&gt;Implementation in C(++)&lt;/h4&gt;
&lt;p&gt;
In C++, we can directly use the functions in the (C-) signal library. I used this in a classroom package implementing &lt;a href="http://www.math.uu.nl/people/dam/courses/labsci/note_gasuspend.php"&gt;genetic algorithms&lt;/a&gt;. The following code is incomplete, but all relevant parts are included:
&lt;/p&gt;
&lt;pre&gt;&lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;#include&lt;/span&gt; &amp;lt;iostream&amp;gt;
&lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;#include&lt;/span&gt; &amp;lt;csignal&amp;gt;

&lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;#include&lt;/span&gt; "galib.h"

bool stopGiven = false;

void handleUserStop(int sig_num)
{
  stopGiven = true;
  std::cout &amp;lt;&amp;lt; "*** User interrupt caught." &amp;lt;&amp;lt; std::endl;
  std::cout &amp;lt;&amp;lt; "*** Please stand by while current generation is completed and saved." &amp;lt;&amp;lt; std::endl;
}

int main(int argc, char **argv)
{
  signal(SIGTSTP, handleUserStop);

  &lt;span style="font-style: italic;"&gt;// ...&lt;/span&gt;

  &lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;while&lt;/span&gt; (!stopGiven) {
    p-&amp;gt;nextGeneration();
    &lt;span style="font-style: italic;"&gt;// ...&lt;/span&gt;
  }

  &lt;span style="font-style: italic;"&gt;// In case of a user stop signal or when requested, save last generation&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 204); font-weight: bold;"&gt;if&lt;/span&gt; (stopGiven || parameters.savelastgen) {
    std::cout &amp;lt;&amp;lt; "Writing generation #" &amp;lt;&amp;lt; i &amp;lt;&amp;lt; " to file \"" &amp;lt;&amp;lt; LASTGENFILE &amp;lt;&amp;lt; "\"." &amp;lt;&amp;lt; std::endl;
    p-&amp;gt;writePopulation(fpopout);
  }
  fpopout.close();

  delete p;
  return 0;
}
&lt;/pre&gt;
&lt;p&gt;
Notice how the custom signal handler now &lt;span style="font-style: italic;"&gt;is&lt;/span&gt; enabled by the signal library, installed in one step by the call &lt;code&gt;signal(SIGTSTP, handleUserStop);&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
Now that I have saved intermediate solution data, I can extend the main program to offer a resume functionality, using the data file for initialization. That task is not only easy, but it also does not have anything to do with signals, so I will not cover that here.
&lt;/p&gt;
&lt;p&gt;
I still benefit from the above functionality almost every week, I hope it serves you well too.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8652939-9094739662968222482?l=arthurvd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arthurvd.blogspot.com/feeds/9094739662968222482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8652939&amp;postID=9094739662968222482' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/9094739662968222482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/9094739662968222482'/><link rel='alternate' type='text/html' href='http://arthurvd.blogspot.com/2007/04/ultimate-coolness-of-signal-catching.html' title='The Ultimate Coolness of Signal Catching'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/12162627333168336969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8652939.post-117579935581467799</id><published>2007-04-05T20:21:00.000+02:00</published><updated>2007-04-07T12:26:56.466+02:00</updated><title type='text'>Cleaning up the Mesh</title><content type='html'>Allright, the following is intended only for a small public probably, but whoever occasionally puts pictures of adaptive meshes in electronic presentations should read on.

I work with (moving) adaptive meshes. There is one major problem when visualizing these things: resolution. In printed matter, my EPS or PDF pictures exported from MATLAB are of course tack sharp. Unfortunately in small pictures, the hundreds of lines tend to blacken the entire image. Setting the line width to approximately 0.2 solves this.
&lt;pre&gt;
&amp;#187; mh = mesh(x, y, 0*x, 'LineWidth', 0.2, 'EdgeColor', 'k');
&lt;/pre&gt;

That whas the easy part. Now what if the output device does &lt;span style="font-style:italic;"&gt;not&lt;/span&gt; have as much resolution as a laser printer?

&lt;h4&gt;Mesh Moir&amp;eacute;&lt;/h4&gt;
When using the same PDF pictures in an electronic presentation, e.g., by &lt;a href="latex-beamer.sourceforge.net/"&gt;latex-beamer&lt;/a&gt;, the viewer is left to do a proper rendering of the vector graphics in the PDF picture at a low resolution (think of a 1024 px screen width). I have not seen a viewer do this without showing &lt;a href="http://en.wikipedia.org/wiki/Moir%C3%A9_effect"&gt;moir&amp;eacute; effects&lt;/a&gt;. Below is a screen capture of acroread rendering a 200 by 200 adaptive mesh:

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger/5710/597/1600/249856/hd22conf11_ar_pdf.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/x/blogger/5710/597/400/169362/hd22conf11_ar_pdf.png" border="0" alt="" /&gt;&lt;/a&gt;

It looks awful! This will not impress the audience! What makes this even more complicated is that each program performs differently (I've had the best results with acroread 4 so far...), and that at each location the beamer is probably different in resolution from prior locations. So, I wanted to get rid of the on site rendering of these vector graphics. I'll just create a bitmap version and include that.

Here's the MATLAB PNG output:

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger/5710/597/1600/361223/hd22conf11_ml.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/x/blogger/5710/597/400/447786/hd22conf11_ml.png" border="0" alt="" /&gt;&lt;/a&gt;
(Click on image for actual MATLAB output: MATLAB does not do antialiasing!)


So, which program &lt;span style="font-style:italic;"&gt;does&lt;/span&gt; do good rasterizing? I had heard &lt;a href="http://mbravenboer.blogspot.com/"&gt;Martin Bravenboer&lt;/a&gt; being really enthusiastic about the &lt;a href="http://www.w3.org/Graphics/SVG/"&gt;SVG&lt;/a&gt; rasterizer in the &lt;a href="http://xmlgraphics.apache.org/batik/"&gt;Batik SVG Toolkit&lt;/a&gt;.

I got an SVG export for my MATLAB figure by the &lt;a href="http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=7401&amp;objectType=FILE"&gt;plot2svg&lt;/a&gt; add-on. In MATLAB, this was just:
&lt;pre&gt;
&amp;#187; plot2svg('hd22conf11.svg')
&lt;/pre&gt;

Next, from a terminal, I let Batik render at the desired resolution:
&lt;pre&gt;
&amp;gt; java -Xmx512m -jar $PKGROOT/batik/current/batik-rasterizer.jar -w 500 -h 500 -bg
 255.255.255.255 hd22conf11.svg
&lt;/pre&gt;
(Notice how I had to increase Java's maximum heap size; the SVG itself is 8MB, and the rasterizing apparently takes a lot of memory.)

The resulting MATLAB -&amp;gt; SVG -&amp;gt; PNG output:
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger/5710/597/1600/692013/hd22conf11_batik500.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/x/blogger/5710/597/400/986187/hd22conf11_batik500.png" border="0" alt="" /&gt;&lt;/a&gt;


Still far from optimal... I'm willing to lose some sharpness, if that rids me of the moir&amp;eacute;. So, I rasterize a huge image, say 4000 by 4000 px, and scale that down to the desired size, e.g., by &lt;a href="http://www.imagemagick.org/"&gt;ImageMagick&lt;/a&gt;'s convert:
&lt;pre&gt;
&amp;gt; java -Xmx512m -jar $PKGROOT/batik/current/batik-rasterizer.jar -w 4000 -h 4000 -bg
 255.255.255.255 hd22conf11.svg
&amp;gt; convert -resize 500x500 hd22conf11.png hd22conf11_batik4000convert500.png
&lt;/pre&gt;

The resulting MATLAB -&amp;gt; SVG -&amp;gt; PNG large -&amp;gt; PNG resized output:
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger/5710/597/1600/126453/hd22conf11_batik4000convert500.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/x/blogger/5710/597/400/8853/hd22conf11_batik4000convert500.png" border="0" alt="" /&gt;&lt;/a&gt;

Now, &lt;span style="font-style:italic;"&gt;that&lt;/span&gt;'s what makes me happy. Of course, some sharpness is lost, but what do you expect, for a 200 by 200 mesh on just slightly more than 400 by 400 px?

A final note: when including the above PNG into your latex-beamer presentation will again lead to a resizing of this PNG, with minor moir&amp;eacute; as a result. I found an image of 560 px wide, included at half size the most acceptable, and far better than anything I've seen so far.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8652939-117579935581467799?l=arthurvd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arthurvd.blogspot.com/feeds/117579935581467799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8652939&amp;postID=117579935581467799' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/117579935581467799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/117579935581467799'/><link rel='alternate' type='text/html' href='http://arthurvd.blogspot.com/2007/04/cleaning-up-mesh.html' title='Cleaning up the Mesh'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/12162627333168336969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8652939.post-111873807367921126</id><published>2005-06-14T09:52:00.000+02:00</published><updated>2005-06-14T12:55:17.153+02:00</updated><title type='text'>What's in a Name?</title><content type='html'>&lt;p&gt;
Mathematicians, being exact scientists, use many symbols to denote entities, properties and whatever more they are working with. The problem comes with the size of the alphabet: it is way too small. I can sit down with a numerical colleague, walk through the 26-letter &lt;a href="http://en.wikipedia.org/wiki/Latin_alphabet"&gt;Latin alphabet&lt;/a&gt; and we'll probably come up with the same meaning for most of the letters (&lt;i&gt;a&lt;/i&gt;-&lt;i&gt;c&lt;/i&gt; are constants, &lt;i&gt;d&lt;/i&gt; is the differential operator, &lt;i&gt;e&lt;/i&gt; is the base of the natural logarithm, [..], &lt;i&gt;j&lt;/i&gt; and &lt;i&gt;k&lt;/i&gt; are used for subscripting, etc.) Doing the same with a physisist will have different results (&lt;i&gt;c&lt;/i&gt; is the speed of light, &lt;i&gt;e&lt;/i&gt; is energy, &lt;i&gt;k&lt;/i&gt; is a wave number). This is not so bad though, the contexts are different enough to distinguish between them. Besides, we can use capital letters, add the &lt;a href="http://en.wikipedia.org/wiki/Greek_alphabet"&gt;greek alphabet&lt;/a&gt;, and use &lt;a href="http://www.artofproblemsolving.com/LaTeX/AoPS_L_GuideCommands.php#texts"&gt;calligraphic notation&lt;/a&gt; as well.&lt;br/&gt;
But take &lt;i&gt;e&lt;/i&gt; for example, is it total energy (or is that &lt;i&gt;E&lt;/i&gt;?), internal energy (or is that &amp;#949;?), or just energy per unit mass (or is that &lt;i&gt;e&lt;/i&gt;/&amp;#961;). Only within subgroups, scientists may have conventions for this. As long as you mention in the surrounding text what your symbols mean, there is no problem. I like being consistent though, at least throughout my own work. So, being in the start of &lt;a href="http://arthur.van-dam.net/twiki/bin/view/Arthur/PhD"&gt;my PhD&lt;/a&gt;, I find this the right time to decide on my own naming conventions. Hence, I find myself doubting about smallcaps &lt;i&gt;e&lt;/i&gt;'s versus capital &lt;i&gt;E&lt;/i&gt;'s, counting their occurrences in other's publications. What a job; having time for this! (OK, &lt;i&gt;making&lt;/i&gt; time for this)
&lt;/p&gt;&lt;p&gt;
Names of (numerical) methods also lead to confusion; the main cause here is not the lack of symbols, but the overwhelming amount of methods. It took me some time to figure out the subtle differences between &lt;I&gt;Lax-Friedrichs&lt;/I&gt; (LF) and &lt;i&gt;local&lt;/i&gt; LF, MUSCL-type &lt;I&gt;interpolation&lt;/I&gt; and MUSCL-type &lt;I&gt;fluxes&lt;/I&gt;, &lt;i&gt;slope&lt;/i&gt; limiters and &lt;i&gt;flux&lt;/i&gt; limiters, flux &lt;i&gt;averaging&lt;/i&gt; and flux &lt;i&gt;differencing&lt;/i&gt; and still have a lot more to figure out.&lt;br /&gt;
Unofficial self-invented names may sometimes even be incorrect. When restricting a two-dimensional model to one spatial dimension, everyone agrees on calling this `1.5D'. Doing the same, starting with a three-dimensional model, &lt;a href="http://hermes.elte.hu/~gtoth/Papers/divb.html"&gt;T&amp;oacute;th&lt;/a&gt; and &lt;a href="http://portal.acm.org/citation.cfm?id=1063068.1063085"&gt;Li&lt;/a&gt; incorrectly call this `2.5D'. I agree with &lt;a href="http://www.ans.org/pubs/journals/fst/va-45-2T-107-114"&gt;Keppens&lt;/a&gt; on calling this `1.75D'. After all, there is still only one spatial direction considered.
&lt;/p&gt;&lt;p&gt;
Finally, most words have many meanings. I am working on adaptive techniques for solving partial differential equations; I use &lt;a href="http://www.cfd-online.com/Resources/topics.html#refine"&gt;adaptive &lt;i&gt;meshes&lt;/i&gt;&lt;/a&gt;. But often, these are also called adaptive &lt;i&gt;grids&lt;/i&gt;. Or people speak of grid points, gridding, grid generation.&lt;br /&gt;
What's wrong with this? Basically nothing, except that the last few years &lt;a href="http://en.wikipedia.org/wiki/Grid_computing"&gt;grid computing&lt;/a&gt; has become an enormous hype, with publications and conferences all over. And `their' grid is completely different from `our' grid. So, I hereby call on all of my fellow adaptive mathematicians: let's forget about gridding, use meshing, meshes, mesh points (don't forget the whitespace), meshed up, etc.
&lt;/p&gt;&lt;p&gt;
To conclude: symbol conventions will probably remain different for ever, are not problematic, just annoying for some. And naming conventions can sometimes easily be decided on (if one of them is incorrect). In other cases, it depends on whether people are willing to give up the terms that they have been using for years. The latter is wishful thinking, I guess.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8652939-111873807367921126?l=arthurvd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arthurvd.blogspot.com/feeds/111873807367921126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8652939&amp;postID=111873807367921126' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/111873807367921126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/111873807367921126'/><link rel='alternate' type='text/html' href='http://arthurvd.blogspot.com/2005/06/whats-in-name.html' title='What&apos;s in a Name?'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/12162627333168336969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8652939.post-111117371149981022</id><published>2005-03-18T22:47:00.000+01:00</published><updated>2005-03-20T19:18:00.416+01:00</updated><title type='text'>Cite it Right!</title><content type='html'>&lt;p&gt;The last few months I found out that obtaining correct bibliographic references for publications I want to cite, is a time consuming job.
&lt;/p&gt;&lt;p&gt;
As the majority of mathematical/technical scientists I use LaTeX for my publications, and combine it with BibTeX for generating reference lists automatically. BibTeX takes your document, and your bibliography database file, and extracts only the necessary entries from the latter and inserts a bibliography into your LaTeX document. Key point here is to have an extensive bibliography database of your own.
&lt;/p&gt;&lt;p&gt;
Of course one starts with adding some entries by hand, title, author, and some more fields that are evident from the paper copy you just printed. Soon this becomes boring though, especially when you've come to &lt;tt&gt;@techreport&lt;/tt&gt;'s or &lt;tt&gt;@incollection&lt;/tt&gt;'s, where you always have to look up again which fields were mandatory and which optional fields might be handy as well.
&lt;/p&gt;&lt;p&gt;
All this data should be readily available of coarse, at the publisher's website for example. &lt;a href="http://www.sciencedirect.com/science/journals"&gt;Elsevier's ScienceDirect&lt;/a&gt; is pretty good at this, but it takes some searching. After clicking twice, saving a &lt;tt&gt;.ris&lt;/tt&gt; file, converting it with &lt;a href="http://www.scripps.edu/~cdputnam/software/bibutils/"&gt;Bibutils&lt;/a&gt; to xml and subsequently to BibTeX, pasting it into one of my central &lt;tt&gt;.bib&lt;/tt&gt; files, and finally copy-pasting the &lt;a href="http://doi.org/"&gt;doi url&lt;/a&gt;, I'm done. Quite some effort, not? Other services (e.g. &lt;a href="http://portal.acm.org/dl.cfm"&gt;the ACM Digital Library&lt;/a&gt;) offer only limited data in their BibTeX, like author, title and a url. So, availability can be a problem, and also uniformity -- or better: completeness -- is missing when getting bibliographic references from the web.
&lt;/p&gt;&lt;p&gt;
Another solution to this would be that in the "list of publications" that every researcher has on his/her webpage, each entry is accompanied by citation data, in RIS or BibTeX format, I assume the author is willing to put some effort in getting the correct and complete data together. &lt;i&gt;It would be even better to have some central, worldwide database that can be queried, both interactively and automated (e.g. through scripts and prescribed URLs, and filled with official, complete data by the publishers&lt;/i&gt;. Just like the &lt;a href="http://www.cddb.com"&gt;CDDB&lt;/a&gt; music album database.
&lt;/p&gt;&lt;p&gt;
An intermediate solution is for institutions to set up their local citation database, it seems to me &lt;a href="http://refdb.sourceforge.net/"&gt;RefDB&lt;/a&gt; is a nice software package for that, I might try that some day soon. For now, I'll just maintain my own &lt;tt&gt;.bib&lt;/tt&gt; files, by copy-pasting a lot, and querying with &lt;a href="http://www.gerd-neugebauer.de/software/TeX/BibTool.en.html"&gt;BibTool&lt;/a&gt; and some quick-n-dirty shell scripts.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8652939-111117371149981022?l=arthurvd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arthurvd.blogspot.com/feeds/111117371149981022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8652939&amp;postID=111117371149981022' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/111117371149981022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/111117371149981022'/><link rel='alternate' type='text/html' href='http://arthurvd.blogspot.com/2005/03/cite-it-right.html' title='Cite it Right!'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/12162627333168336969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8652939.post-110612683778111287</id><published>2005-01-19T10:10:00.000+01:00</published><updated>2005-01-19T10:28:18.130+01:00</updated><title type='text'>Sad Sun</title><content type='html'>&lt;p&gt;...And the story continues. At the &lt;a href="http://www.math.uu.nl"&gt;Mathematical Institute&lt;/a&gt; we have a long tradition of using Sun workstations. My Sun Blade 100 used to work fairly well, especially after my &lt;a href="http://arthur.van-dam.net/twiki/bin/view/Arthur/TuningSolaris"&gt;own customizations&lt;/a&gt;.
&lt;/p&gt;&lt;p&gt;
Now I got a Blade 150 instead (I asked for it myself, montsh ago, stupid fool I am). Blade 150 sounded a whole lot better than Blade 100, but except for the double RAM (2GB) it's not shocking. I could live with that though. However, great was my horror, when the long-forgotten, but well-remembered colormap problem turned up with this new workstation. At this very moment I'm watching a screen that uses blue where it should use gray, en uses some dithered coloring on other non-standard colors. It's like watching a 1024x768 GIF image with only 64 colors. My cursor is even invisible.
&lt;/p&gt;&lt;p&gt;
Probably, Solaris-gurus know a fix for this, and probably I shouldn't blame Sun, but our system administrator/hardware buyer instead. But I've had it with these crappy systems. Old, ugly &lt;a href="http://www.opengroup.org/cde/"&gt;CDE&lt;/a&gt;, crashing firefoxes, slow responses, non-working [Home]/[End] keys. Aargh!
&lt;/p&gt;&lt;p&gt;
Longing for a institute-wide migration to Linux/x86 systems is a non-realistic utopia, so I got myself a Pentium-M laptop instead. Now if only I could find a way to get an internet connection to it...
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8652939-110612683778111287?l=arthurvd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arthurvd.blogspot.com/feeds/110612683778111287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8652939&amp;postID=110612683778111287' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/110612683778111287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/110612683778111287'/><link rel='alternate' type='text/html' href='http://arthurvd.blogspot.com/2005/01/sad-sun.html' title='Sad Sun'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/12162627333168336969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8652939.post-110338634609841629</id><published>2004-12-18T17:12:00.000+01:00</published><updated>2004-12-18T17:14:52.150+01:00</updated><title type='text'>Sit Down and Listen...</title><content type='html'>&lt;p&gt;
Flabbergasted, I think that's the right word to describe how I am touched by the sound of the Belgian trip-hop band Hooverphonic, with Geike Arnaert as singer. Band info at &lt;a href="http://www.hooverphonic.com"&gt;www.hooverphonic.com&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;
Why flabbergasted? I've known the album '&lt;span style="font-style: italic;"&gt;Sit Down and Listen to Hooverphonic&lt;/span&gt;' for almost a year now, I 'just liked' it.
A few months ago I 'got' the album as MP3 files on my PC, and listened it more often. Next, I went to their live performance at &lt;a href="http://www.vredenburg.nl/"&gt;Vredenburg in Utrecht&lt;/a&gt;, November 2004. Besides that I really like this music theatre, the band played great. Very standard, hardly improvising, but just (super-)high quality. So pure, the vocals and strings. Last week I got the album on cd, still feels better to have a proper cd instead, not having to turn on my PC, the official booklet/artwork, just nice.
&lt;/p&gt;&lt;p&gt;
'The World is Mine', and 'Sometimes' are not bad, but not my favourites either, the former makes me a bit nervous. For the rest, the album is superb. The smooth opening by 'Antarctica' and 'One', the oh-so-nice slow 'Jackie Cane'. '2 Wicky', that's blues man!, or jazz? well... whatever. 'Frosted Lake Wood', a kid-like story being told. The sensitive 'Eden', and 'Vinegar and Salt' with beautiful piano and strings play. 'Sad Song' and 'Someone', just nice. 'The Last Thing I Need is You' is a vivid, cheer-up song (bit of a pity though, that the crowd didn't join singing 'Pa pa.. papapaaa' when Geike asked).
&lt;/p&gt;&lt;p&gt;
I hardly ever play albums twice or more a day, this album allows that though. It's just beautiful.
&lt;/p&gt;&lt;p&gt;
At first I wanted to dedicate this blog to the singer, Geike Arnaert, but I realize that the musicians, strings, piano, bass and all more, form the music together. Still, Geike is such an elegant, yes beautiful appearance, but above all, she's got such a pure voice, from high to low. She can take a number on her own, live, without problems (which she did almost with 'Eden', just piano guidance, and also more-or-less with 'Frosted Flake Wood')
&lt;/p&gt;&lt;p&gt;
I'll try the other original albums soon probably, but I doubt if it gets any better than this album.
&lt;/p&gt;&lt;p&gt;
&lt;br/&gt;
(oh, almost forgot, I find belgian women talking dutch sooo sexy, so I might be biased about the live performance ;-) )
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8652939-110338634609841629?l=arthurvd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arthurvd.blogspot.com/feeds/110338634609841629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8652939&amp;postID=110338634609841629' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/110338634609841629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/110338634609841629'/><link rel='alternate' type='text/html' href='http://arthurvd.blogspot.com/2004/12/sit-down-and-listen.html' title='Sit Down and Listen...'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/12162627333168336969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8652939.post-110115760476413897</id><published>2004-11-22T21:29:00.000+01:00</published><updated>2004-11-22T22:06:44.766+01:00</updated><title type='text'>Zijpaadjes</title><content type='html'>&lt;blockquote&gt;&lt;strong&gt;zijpad&lt;/strong&gt; [Dut], &lt;em&gt;'n zijpaadje inslaan, (fig.)&lt;/em&gt; ride off on a side issue&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;Zijpaadjes&lt;/em&gt; are evil. You try and should be working on some important job, when suddenly, a &lt;em&gt;nice idea&lt;/em&gt; pops up in your head.&lt;br/&gt;
For example: "It would be really cool to have &lt;a href="http://www.stratego-language.org/Stratego/StrategoMisc#TermColor"&gt;color support in Stratego&lt;/a&gt;!".&lt;br/&gt;
Or, "Wouldn't I &lt;em&gt;be the MAN&lt;/em&gt; if I got &lt;a href="http://arthur.van-dam.net/twiki/bin/view/Arthur/GnomeOnSolaris"&gt;Gnome running on Solaris&lt;/a&gt;?".&lt;br/&gt;
Or: "I should really &lt;a href="http://arthurvd.blogspot.com/2004/11/zijpaadjes.html"&gt;write a new blog note soon&lt;/a&gt;."&lt;/p&gt;


&lt;p&gt;&lt;em&gt;Zijpaadjes&lt;/em&gt; shuffle one's priorities, biased that is, since the side issue will always end up on top of the list. Encouraged by the freshness of such a new idea it is so tempting and easy to shift all matter aside and directly ride off on this side issue.
&lt;/p&gt;&lt;p&gt;
&lt;em&gt;Zijpaadjes&lt;/em&gt; change one's normal perception of time and space. Deadline for tomorrow 12AM? That's so far ahead, time enough to get on a little bit more! &lt;em&gt;Not.&lt;/em&gt;
&lt;/p&gt;

&lt;p&gt;But realize:&lt;br&gt;
&lt;em&gt;Zijpaadjes&lt;/em&gt; are like spring cleanup. Stir up that dusty mind filled with weekly tasks and obligations. When you get back to normal after a week, things might look wholly different!
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Zijpaadjes&lt;/em&gt; deliver you: friends! The side issues are not seldomly aimed at the wishes of someone near you. You will be praised and overloaded with short-term compliments the moment you have successfully completed the side issue for them.&lt;/p&gt;

&lt;p&gt;So, in conclusion: although they're some sort of self-imposed addiction, I like &lt;em&gt;zijpaadjes&lt;/em&gt; too much to stop with them.&lt;br/&gt;
&lt;em&gt;Zijpaadjes, can't go quickly with them, can't go without them.&lt;/em&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8652939-110115760476413897?l=arthurvd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arthurvd.blogspot.com/feeds/110115760476413897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8652939&amp;postID=110115760476413897' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/110115760476413897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/110115760476413897'/><link rel='alternate' type='text/html' href='http://arthurvd.blogspot.com/2004/11/zijpaadjes.html' title='Zijpaadjes'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/12162627333168336969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8652939.post-109896583051932689</id><published>2004-10-28T13:20:00.000+02:00</published><updated>2004-10-28T14:36:21.126+02:00</updated><title type='text'>Hush, hush, don't rush</title><content type='html'>&lt;p&gt;What is wrong with my long-term memory? I seem to have forgotten too many things from the past. Well, not forgotten, but they're hidden in some remote, dusty corner of my brain. Specifically, I mean mathematical knowledge here: What were &lt;span style="font-style:italic;"&gt;properties of Crank-Nicholson&lt;/span&gt;, what's the &lt;span style="font-style:italic;"&gt;use of a positive definite matrix&lt;/span&gt;, and why, oh why do the &lt;span style="font-style:italic;"&gt;Navier-Stokes equations look only remotely familiar&lt;/span&gt;?
&lt;/p&gt;
&lt;p&gt;
Have I been out of it for too long? Well, two years of computer science cannot be &lt;span style="font-style:italic;"&gt;that&lt;/span&gt; devastating, can they?&lt;br/&gt;
Were the former &lt;a href="http://www.math.uu.nl/cs/index_en.html"&gt;Computational Science&lt;/a&gt; students educated in a too broad, but too little `in depth' fashion? Possibly, from database programming, along electrodynamics, to numerical PDE analysis, we've had it all. Still, most physics and mathematics courses were good enough. The fact that I'm able to &lt;span style="font-style:italic;"&gt;realize&lt;/span&gt; that I've almost forgotten so many things indicates that I &lt;span style="font-style:italic;"&gt;know of the existence&lt;/span&gt; of all these many things.&lt;br/&gt;
I think I know the true answer: I'm rushing through things too much. Get into any matter quickly, solve some problems for it, implement it, or write a short report on it, and proceed to what's next. Some computer science courses even included an 'open-book exam', which allowed me to pass without having studied the matter in advance at all. Common sense is a good thing to have, but to have more factual knowledge would also be very good.
&lt;/p&gt;
&lt;p&gt;
So at the moment I'm taking a fresh-up course in computational fluid dynamics, and one in numerical linear algebra. For the latter, I don't have time now, caused by two courses in linear algebra and calculus that I teach, and one in scientific computing that I assist in.
Although cfd is interesting, I feel the urge of doing my own research, some serious deadlines coming up within months and I've only just started. Or do we sense my old "rush-on-to-what's-next"-mistake again here? I guess so...
&lt;/p&gt;
&lt;p&gt;
The problem is: when I see interesting things lying ahead of me, I get enthusiastic. At the moment I would love to start implementing and experimenting right away, whereas it is better to first catch up with the field by reading others' papers. That's what I'm doing right now. Fortunately I have some open ends in my own previous work, which I can work on even now already, gives some variety from day to day.
&lt;/p&gt;
&lt;p&gt;
Analyzing oneself is not too difficult, but changing one's bad habits is a whole different story. I hope I'll succeed!
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8652939-109896583051932689?l=arthurvd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arthurvd.blogspot.com/feeds/109896583051932689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8652939&amp;postID=109896583051932689' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/109896583051932689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/109896583051932689'/><link rel='alternate' type='text/html' href='http://arthurvd.blogspot.com/2004/10/hush-hush-dont-rush.html' title='Hush, hush, don&apos;t rush'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/12162627333168336969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8652939.post-109782777589976308</id><published>2004-10-15T09:55:00.000+02:00</published><updated>2004-10-28T14:40:12.600+02:00</updated><title type='text'>The Mesh Is Moving...</title><content type='html'>&lt;p&gt;
Maybe I should somehow 'mark' the beginning of a period of four years I just entered. October 1, 2004, I started as a PhD student at the Mathematical Department of Utrecht University in The Netherlands. Under supervision of &lt;a href="http://www.math.uu.nl/people/zegeling"&gt;Dr. Paul Zegeling&lt;/a&gt;, with &lt;a href="http://www.math.uu.nl/people/vorst"&gt;Prof.dr. Henk van der Vorst&lt;/a&gt; as promoter, I work on a &lt;a href="http://www.nwo.nl/"&gt;NWO-STW&lt;/a&gt;-funded project titled &lt;a href="http://www.nwo.nl/subsidiewijzer.nsf/pages/9E25716FFD12D37AC1256F1F00335ADA?Opendocument"&gt;"Adaptive moving mesh methods for higher-dimensional nonlinear hyperbolic conservation laws"&lt;/a&gt;.
&lt;/p&gt;

&lt;h4&gt;Adaptive &lt;span style="font-style:italic;"&gt;what&lt;/span&gt;??...&lt;/h4&gt;
&lt;p&gt;Adaptive meshes are space discretizations of a domain (here in either 1D, 2D or maybe later 3D), that are &lt;span style="font-style:italic;"&gt;non-uniform&lt;/span&gt;. Instead of dividing the domain uniformly into &lt;span style="font-style:italic;"&gt;N&lt;/span&gt; equally-sized cells, some cells are bigger than others. Parts of the solution that need a fine discretization will get small cells at that location, other locations will have bigger cells (coarser discretization) than a uniform discretization would yield.
&lt;/p&gt;

&lt;h4&gt;But why bother?&lt;/h4&gt;
&lt;p&gt;Solving discretized systems can become very costly, the finer the discretization (the bigger &lt;span style="font-style:italic;"&gt;N&lt;/span&gt;), the longer it takes. Instead of increasing &lt;span style="font-style:italic;"&gt;N&lt;/span&gt; for obtaining a more accurate solution, let's keep it constant and shift each of the mesh points to an appropriate location such that the points will be close to each other where necessary for an accurate solution and further away at other parts of the domain.&lt;br/&gt;
We now have some additional cost for shifting the mesh points, and interpolating the solution each time the mesh changes, but we save the huge costs of increasing &lt;span style="font-style:italic;"&gt;N&lt;/span&gt;.
&lt;/p&gt;

&lt;h4&gt;And you need four years for this?&lt;/h4&gt;
&lt;p&gt;There are many things to this. Firstly, how can we have the mesh being moved automatically in an &lt;span style="font-style:italic;"&gt;optimal way&lt;/span&gt;? Next, how do we efficiently, but accurately interpolate the solution on the newly moved mesh? Quite some research has already been done on this. Next, apply this in two-dimensional domains, how to prevent your mesh from becoming too irregular, or even worse, degenerate? The discretization of PDEs on a non-uniform mesh also becomes a whole lot less trivial in 2D and 3D.&lt;br/&gt;
What can be said on the convergence and stability of this method? Any formal error-estimates?
&lt;/p&gt;

&lt;h4&gt;So now your plans are?&lt;/h4&gt;
&lt;p&gt;Re-reading a lot! Having been away from any mathematics for almost two years, quite some knowledge has sunk away into the very far corners of my brain. I sometimes feel like a bachelor student in mathematics... Besides that a conference comes up, I should recollect some ideas we had in the last two years and make a paper out of it, prepare for the visit of &lt;a href="http://www.math.hkbu.edu.hk/~ttang/"&gt;Dr. Tao Tang&lt;/a&gt; who is from The Hong Kong Baptist University and has many experience with moving mesh problems involving systems with conservation laws. Looking forward to that.
&lt;/p&gt;
&lt;p&gt;
Alright, that was quite some writing, maybe not even too interesting as it was a very quick and general story, but think of it as the 'obligatory introduction story'. Stay tuned 'till next time!
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8652939-109782777589976308?l=arthurvd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arthurvd.blogspot.com/feeds/109782777589976308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8652939&amp;postID=109782777589976308' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/109782777589976308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/109782777589976308'/><link rel='alternate' type='text/html' href='http://arthurvd.blogspot.com/2004/10/mesh-is-moving.html' title='The Mesh Is Moving...'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/12162627333168336969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8652939.post-109734607207492852</id><published>2004-10-10T08:21:00.000+02:00</published><updated>2004-10-28T14:42:53.313+02:00</updated><title type='text'>"And here we are..."</title><content type='html'>&lt;p&gt;Saturday, 8PM, and in a whim I decided to make myself a blogger-account. Not because of a sudden urge to spill my thoughts on the internet, but rather because I found blogger looking really decent when reading a new &lt;a href="http://mbravenboer.blogspot.com/"&gt;blog post by Martin Bravenboer&lt;/a&gt;. And since I always like new things that look great, I thought I should go for it as well.
&lt;/p&gt;
&lt;p&gt;
Besides that, Martin mentions that &lt;a href="http://mbravenboer.blogspot.com/2004/10/research-and-blogging.html"&gt;"many bright people are communicating their ideas and thoughts in their weblogs"&lt;/a&gt; and he is surprised about how
&lt;a href="http://mbravenboer.blogspot.com/2004/10/research-and-blogging.html"&gt;"limited the number of researchers that are blogging"&lt;/a&gt; is. The limited number probably depends on what area of research one is looking at, but the note on 'bright people' really did appeal to me, so here I am.
&lt;/p&gt;
&lt;p&gt;
What will I blog about? Purely professional matter? In my case that would be numerical mathematics, since I just started as a PhD student on time-dependent adaptive meshes for PDE systems.&lt;br/&gt;
Or could this blog involve personal matter as well? Maybe on which nice new skate routes I found, or on which beautiful new photographs I shot today?&lt;br/&gt;
We'll see what happens, as said I just started in a whim and actually do not have anything bright to share with you at the moment, dear reader. So, please "enjoy your meal and we'd love to see you back next time!"
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8652939-109734607207492852?l=arthurvd.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arthurvd.blogspot.com/feeds/109734607207492852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8652939&amp;postID=109734607207492852' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/109734607207492852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8652939/posts/default/109734607207492852'/><link rel='alternate' type='text/html' href='http://arthurvd.blogspot.com/2004/10/and-here-we-are.html' title='&quot;And here we are...&quot;'/><author><name>Arthur</name><uri>http://www.blogger.com/profile/12162627333168336969</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
