Here is a diff file containing the changes which, modulo a little
cleanup or possible bugfixes, I'll be committing to the SVN head this
weekend:

http://users.ices.utexas.edu/~roystgnr/femcontext.diff

It takes all element-integration-specific member variables in the
FEMSystem and parent class, and moves them from there to a new
FEMContext and parent class, which among other things should make it
possible for a single System to operate simultaneously on multiple
Contexts in a multithreaded environment.  (Note that the threading
code isn't yet there, but these should be all the user API changes
necessary to make it work)

For other FEMSystem users, the important part of the diff is the ex18
parts at the end, which show the API breakage and the necessary fixes
for user-level code:

Methods like element_time_derivative() now take a bool+context as
arguments, not just the bool.

System-wide initialization work still belongs in system::init_data();
context-specific work must be moved to system::init_context();

Because system member variables are now context member variables, a
whole lot of things like "element_qrule" are now "c.element_qrule".


There's a couple fixes which aren't quite as clean, but which I can't
figure out how to improve:

Before, we used some nice variables like "fe_velocity" to reference
uglier names like "element_fe_var[u_var]"; that's no longer an easy
thing to do within a system class that may now have multiple versions
of the same object running around in different threads.

There's some ugly casts from DiffContext to FEMContext.


And there's something I'd like to change, but won't:

The "untested();" warning is still in DiffSystem, because I'm still
not certain we won't want to make another major change to the API
again later.  Hopefully this change is the worst of it, though.


Anyway, current FEMSystem users might want to take a look before I go
breaking your code.
---
Roy

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to