|
Boost : |
Subject: Re: [boost] [units] - learning to use, more questions :)
From: Janek Kozicki (janek_listy_at_[hidden])
Date: 2011-11-28 15:43:14
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/ |
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk