Boost logo

Boost :

From: Markus Werle (numerical.simulation_at_[hidden])
Date: 2008-03-18 18:23:41


Eric Niebler wrote:

> In picking a max arity for a DSEL, I think we reach the limits of human
> readability (a function that takes 20 arguments?! Really?) before we
> reach Proto's breaking point.

I am dreaming of:

scalar_field<0> rho;
scalar_field<1> u;
scalar_field<2> v;
....

Solver.AddPDESystem()
[ddt(rho) + ddx(rho * u) + ddy(rho * v) + sourceterm == 0],
[ddt(rho * u) + ddx(rho * pow<2, 1>(u)) + ddy(rho * u * v) == 0],
[.. some other 10-20 partial differential eqns. omitted ];

What is not readable here and how many operands are in the
whole expression?

In chemistry there are systems with more than 100 equations of this form.
One day proto will bend before such usecases. You've been warned ;-)

Of course I can stick with what I have now, where I add one PDE
after the other, but that could be improved.

Markus

 
P.S.: rational power is missing in proto! tss, tss ...


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