Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2004-01-12 19:27:51


"Kevin Lynch" <krlynch_at_[hidden]> wrote
> Andy Little wrote:

> > I have 2 questions
> >
> > 1) What is your knowledge of C++?
>
> That's sort of an open ended question, but for what it's worth :-)

Yes odd in retrospect .. slightly impertinent ..apologies.
BTW my views/questions are my own and should not be taken as representative
of others working on similar libs or boost in general.

>
> I'm a practicing particle physicist, and I do lots of programming for MC
> modeling of our experiment, straight numerical calculations of designs,
> analysis of large data sets, hardware data acquisition code, etc. etc.
> etc. I do most of this work in compiled C/C++/Fortran, and it is all
> highly numerical, and in a dialect of interpreted C/C++ that doesn't
> really understand templates.

I should come clean and say my physics is 'schoolboy stuff'
OK... you smash atoms and then try to figure out what the bits are made of?
(Don't know what MC modelling is..probably should).

In standard C++ one use of templates is to allow the user to specify the
details they require from a generic framework or algorithm. Stipulate a 'no
templates' requirement and we would find it quite difficult to do much
anything these days.If it was possible to provide details of your operating
system(s)/ compiler(s), they probably wouldnt mean much to me but might to
someone else on boost.

>
> In all of these cases, a dimensions/unit framework that does NOT allow
> implementation of user defined dimensions and units would be useless to
> me personally. I don't think that I use SI or even CGS anywhere within
> my code: I use a mix of non-dimensionalized calculations and "natural"
> physical units.

Ok The SI system has an underlying logic to it. To use dimensional analysis
there is some similar logic that is applied or you would like to apply to
the framework you are using? If we could figure out how to represent the
'logic'(s) of SI,CGS and 'natural' units, then that would (possibly)be
something we could allow the user to customise (usually via templates)

When I refer to 'units' I refer to the scaling.
ie mm --> m. etc.
In SI if I use metres, seconds,moles, joules etc and all scaling is 1.
Do you have a need to 'adjust' values during calcs, ie scaling as above or
is everything implicitly 1? Is 'scaling' a big issue currently ?

I assume that by non-dimensionalised calculations you mean you use a 'real'
type to represent a dimensioned quantity. Any dimensional analysis is
done(and checked) manually. Do you require a C++ framework that catches
errors in dimensional analysis, or is that a triviality?

I realise that I have a very fixed view of physics specific requirements. It
may be that your real problems lie elsewhere...ie maths

> > 2) Do you have any example calculations we might consider?
>
> Probably nothing I could show, at least without some substantial work
> :-) for two reasons:
>
> 1) I'm stuck using large frameworks for the MC work that I am not going
> to retrofit to use a units framework, and most of that code wouldn't
> make any sense except in the context of the framework.
> 2) Most of the other design calculations I do are formulated in
> "non-dimensionalized" form, so that I don't have to worry about units
> and numerical scaling issues :-)

Current practise then is to fit the calculations to the limitations of the
framework? Would you do it differently in an ideal world?

>
> Let me think about it some more, and see if I can find some time to put
> something together....

What would help most is the sort of thing that shows the current problems
and frustrations. ie "If I could only do This...". I dont see that it has
to be related to D.A./units. Anything which is a C++ problem or could be
fixed by C++ would be useful.

Oh and anything with non integer powers of dimension...preferably
irrational. Seriously for various technical reasons we are currently
(theoretically) able to do rational fractions but not irrational
ones(easily). So some real examples of irrational power-of-dimension calcs
would help to concentrate the mind.

>
> >
> > from the point of view of...
> > Is the time the program takes to calculate important.
>
> My code is either done running in less time that it takes to compile
> (short code that would only benefit from nearly zero compile time
> overhead) or already runs for hundreds of hours (and hence would want a
> zero runtime overhead, a far more important constraint for those
> applications where I would consider using the units framework).
>
> > Is huge accuracy important.
>
> Numerical accuracy (which I assume you are talking about ... an
> inaccurate dimensional analysis framework would hardly be useful :-) is
> certainly not in the purview of the DA/units framework ... that has more
> to do with the selection of algorithms, rescaling techniques, and
> underlying numerical types.....

Do you have/Would you like a framework that takes care of some technical
details.
e.g checking for under/overflow etc and giving you feedback(at compile time
or via exceptions or error messages)
Or other technical issues?

regards
Andy Little


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk