-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Presently, MASA requires calling a specific method for each source term, e.g.
exact_u = masa_eval_exact_u (tempx,tempy); exact_p = masa_eval_exact_p (tempx,tempy);
etc.
We won't break old functionality, but adding a generic source and exact term that parses a string to select which term to evaluate would be nifty. This would then look like,
exact_u = masa_eval_exact ("u",tempx,tempy);
exact_p = masa_eval_exact ("p",tempx,tempy);
No rubber to road yet, so we can plan this out, happy for any feedback/suggestions. Under the hood I'm inclined to build a map between string and a pointer to source/exact functions, e.g. "u":"masa_eval_exact_u()", after which this method calls the appropriate function evaluated at the points it was given. The trick is that we have man different methods due to the numerous overloaded functions for the various dimensionality we might have. We could circumvent this by pointing the map to a container of all the available functions for that variable and then selecting only the one that has the appropriate dimensionality, but I suspect there is a more elegant solution available.
This was an old MASA svn ticket that is being resurrected for @pbauman and @vikramgarg.