
now I started writing a simple code that would calculate a quantum wavefunction of a harmonic oscillator. It would work very quickly without units, but I want to do this using units, just to learn more using units :) I am exactly following the quantum mechanics derivation of these formulas, so it cannot get "simpler" as currently written in the code. And I've hit a brick wall, because I cannot get those lines to compile: quantity<reciprocal_area> lambda ( 2.0*m*E / (hbar*hbar) ); quantity<reciprocal_area> alpha ( m*omega/root<2>(hbar) ); double lambda_per_alpha ( lambda / alpha ); Even the first one has problems, to my surprise. Maybe I really should change my g++ 4.4.5 version to a newer version? I will gladly try this if you think it makes sense. Would upgrading boost from 1.42 to 48 help? Code is in the attachment, but it's almost empty now, since I got stuck at declaring variables for calculating stuff :) -- Janek Kozicki http://janek.kozicki.pl/ |