Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2008-03-20 08:44:50

On 03/18/08 17:23, Markus Werle wrote:
> 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 ];
> 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 ;-)

Spirit has something similar except it's equations always have a
single variable (a.k.a. nonterminal in grammar parlance) on one
side of the equation. For example, the calculator::definition
CTOR here:

Spirit uses pointer's to the rhs stored in spirit::rule's which
avoids, somewhat, the compiler limitations. Maybe you could
do something similar.

This sequence of grammar equations (a.k.a. productions)
and a solution to these equations for non-terminal
lookaheads is prototyped using proto in

However, instead of using '[]' to separate the equations, like spirit,
this prototype uses ','.

Maybe the lookahead prototype could give you some ideas for
constructing the equations and solving them for your
PDE solver.

Boost list run by bdawes at, gregod at, cpdaniel at, john at