10 December 2008
A lot of effort went into this
22 October 2008
14 October 2008
Trilinos on the mac
./configure \
--cache-file=config.cache \
--prefix=/usr/local/trilinos-8.0.8-serial \
CC=/usr/bin/gcc CXX=/usr/bin/g++ F77=/usr/local/bin/gfortran \
--with-libs="-framework vecLib" \
--with-ldflags="-Wl,-multiply_defined -Wl,suppress" \
--enable-amesos \
--enable-epetra \
--enable-anasazi \
--enable-aztecoo \
--enable-examples \
--enable-didasko \
--enable-teuchos \
--enable-triutils \
--enable-galeri
I believe that the only software needed to get this to work is the gfortran compiler available at the mac High Performance Computing site.
I found that the with-ldflags line was necessary because otherwise the "pow" check would die from "Undefined symbols: "___gxx_personality_v0", referenced from: __gxx_personality_v0$non_lazy_ptr in ccJ9fzb2.o".
To get a trilinos-base program to compile, run g++ with the Apple compiler with options "-framework vecLib -I/usr/local/trilinos-8.0.8-serial/include -L/usr/local/trilinos-8.0.8-serial/" with the libraries (e.g. "-lepetra").
08 October 2008
Word movement in terminal
Also, this inputrc modification (which makes the up arrow complete to the last occurrence of everything before the cursor) is even better than ctrl-r reverse search.
30 September 2008
Publication-quality plots in MATLAB
Here's what I do: it scales the fonts and figures (using hgexport) and markers so that they show up as not to small a size when included as 3-inch figures, changes the font to Times, makes the minimum line width 0.5 points, exports to EPS, and uses the epstopdf tool to convert it to a pdf (since Matlab's pdf export is buggy and always puts the image on an 8.5 x 11 page). The results look consistent and very clean.
exportNiceFig.m
UPDATE 11/30/2008: I fixed the behavior of some of the resizing when there are multiple axes on a single figure.
UPDATE 01/21/2009: For future updates, see the projects page
24 September 2008
Random number generators
I also spent about an hour trying to find where in my header files I'd somehow done "using namespace std", or if I'd accidentally included a
22 September 2008
What the functor?
This evening, I took that design and added functors to it, so that it can do any arbitrary comparison. I'd just read about them yesterday and gone, "Huh. What kind of weird application could those have?"
10 September 2008
Pseudo-random
They look like random numbers, they smell like random numbers, and by God, we're going to treat them like random numbers.
23 July 2008
Fsssssss
Now if only there were an alarm clock to do this...
19 July 2008
Apricots
18 June 2008
Diffusion
28 April 2008
1E-9
During this time, it's been working for the most part, but freezing up more often (requiring sharper and even more frequent slaps in the past month or two). Finally, about a week ago, I slapped it and heard the terrible sound of the read/write head gouging the disk itself. And it didn't work again.
So I bought an iPod nano. Every time I look at it, I'm awed by how far miniaturization has come. Seven years ago, when the first iPod came out, I was amazed that they could fit 5 gigabytes of music into something the size of a deck of cards. And now I'm holding in my hand a device that's an tenth of the size, has a bigger video-playing screen, and lasts more than twice as long on a charge. It's just so tiny!
19 April 2008
Modern research technology
So my partner and I chose metallic fuels for our topic. Well, basically, thanks to the amazing technology that's only shown up in recent years in available consumer technology, my life and ability to communicate information was fantastically simplified.
The first step was to use Google Scholar to find some good references. So I searched for "metallic fuel" fast reactor and found a few to start with. There's an option in the preferences to show a link to import the bibliography information into BibTeX format (like so). With Michigan's library subscriptions I was able to follow the link to ScienceDirect and other sites and actually download a digital copy of the article as a PDF. [Brief aside: I just realized that PDF format is one of those redundant acronyms.] So with the copied BibTeX information, I opened up BibDesk, created a new entry that now has all of the bibliography data, and dragged in the PDF. From this, I can automatically generate a bibliography in the report and citations and so forth (which, with LaTeX using BibTeX, is a piece of cake).
In short, I was able to easily find a lot of useful references, organize them, and use them. But one of the coolest things actually made itself useful during our presentation. Someone asked a question about iodine and technetium radiotoxicity, and how fast reactors transmuted those to less harmful elements. I couldn't recall anywhere in the papers offhand, but I opened up BibDesk, entered "iodine" in the search file content field, and double-clicked on the paper that showed up. It opened the publication in Preview, and inside that it had automatically highlighted eveywhere that "iodine" appeared in the document. Then I dragged the window over to the projector screen to show the relevent plot and text. So in about 10 seconds I was able to find exactly what information he needed. Pretty sweet! And to think that 25 years ago graduate students were lucky if they didn't have to use a typewrite to write their thesis.
13 April 2008
Typography issues
I grant that I'm occasionally guilty of mistakenly hitting the wrong key (since "0" and "O" are adjacent on the keyboard), but I usually notice and correct it immediately...
09 April 2008
Not very nice
Dear Seth Johnson,So apparently using quotation marks gives a person the license to say whatever they want, as long as he states after the fact that it was a hypothetical situation.
“Congratulations, this letter constitutes our formal offer to you for a position with our company, Proto-Power Corporation.”
Yes, this could be the opening line of your offer letter after you interview and are accepted for a position with Proto-Power Corporation.
"Go away and never talk to me again! Also, I killed your puppy."
Yes, that could be a blog post here if I hated you, and if I killed your puppy.
01 April 2008
Happy Aprilday
26 March 2008
MCNP
17 January 2008
Evolution personified
But nature, for no obvious reason, took a different route. Opting to locate the muscles in the palm and forearm, at a distance from the fingers themselves, evolution tinkered its way to a quasi-two-dimensional system of interconnected tendons, more like fishing net than fishing line. This decidedly nonlinear and complex solution, anathema to "reasonable" engineering design, has paid off handsomely.
In the 19th century or even early 20th century, I could easily imagine a scientific article marveling about the incredible design of the human body in the context of a divine Creator. But to use that kind of language when talking about random processes and natural selection seems kind of silly.
14 January 2008
LaTeX ANS template
Well, for those of you who want to publish a summary for the American Nuclear Society transactions (or to write an abstract for the ANS student conference) but prefer LaTeX to Microsoft Word, today I completed a class and bibliography style that are (EDIT 6/2011) now completely compliant with the published ANS guidelines. Hopefully someone will find this useful. Example files and more details are here.
09 January 2008
Transition to new blogger
RewriteCond %{REQUEST_URI} ^/blog/labels/
RewriteCond %{HTTP_USER_AGENT} !^.*Googlebot.* [NC]
RewriteRule ^blog/labels/(.*).html$ http://reference-man.blogspot.com/search/label/$1 [R,L]
RewriteCond %{REQUEST_URI} ^/blog
RewriteCond %{HTTP_USER_AGENT} !^.*Googlebot.* [NC]
RewriteRule ^blog/(.*)$ http://reference-man.blogspot.com/$1 [R,L]
02 January 2008
Setting up boot camp
For Mac-Windows interoperability:
- HFSExplorer, an alternative to MacDrive that gives read-only access to HFS+ (Mac-formatted) drives from inside Windows. (It needs Java.)
- Installed MacFUSE and NTFS-3G (and applied this fix to ntfs-3g) so that I can read and write to my Windows drive when in OS X.
- Exported my bookmarks from Safari to put them in Firefox for windows
- Changed the theme from XP to classic (the menu bars and task bar take up a lot less space, and the colors are less garish)
- Ran Windows Update (and installed IE7)
- Installed Firefox, NoScript, and AdBlock Plus
- Installed a couple of other pieces of software from the Lifehacker top free Windows software list and the Power replacement list
- Disabled the clicky sounds in the audio control panel.
- Disabled autoplay with this hint
- Disabled the "nag bubbles"
- Changed the alt-tab behavior and modified my default Explorer file list behavior using part of this Lifehacker list
- Put a password on my user account (since it defaults to a blank password!)
- Disabled file sharing (which was on by default; seems pretty foolish)
- Disabled "offline files"
- Turned off the "welcome screen" so that Ctrl-Alt-Del behaves like it does on all the other domain-connected computers I've ever used
- Disabled the windows messenger service
- Swapped the Windows and Alt keys so that the keyboard has the same layout as a standard Windows one (using this key remap hint)
- Installed Cygwin, hid "My Documents" and "Network Places", made a shortcut from /cygwin/home/USER to my desktop, and changed its icon to the documents icon
- Went to Control Panel > Add or Remove Programs > Windows Components and unchecked Outlook Express so it would cease to reappear in my Start Menu
- Added Mac cursors
With Cygwin, I don't have to mess around with the DOS shell, and I can also use its X11 server with MCNP's (admittedly primitive) visualization.
A year with my car
It's been a year since I bought my 2001 Honda Civic. Aside from some problems with the tires and a little routine maintenance, it's done very well. Today I crunched some numbers regarding the cost to own the car and the fuel mileage it's been getting. Yeah, I keep all sorts of data when I fill up the car, get repairs, etc. I know, I'm a super-nerd.
So it's gotten an average of 35 mpg over the last year, which rocks. Also, including the purchase price of the car, inspections, insurance, gas, repairs, etc., it's cost me $0.80 per mile. That's not bad at all.