← Back to team overview

dolfin team mailing list archive

Data and thread safety

 

Hello!

The one reason (as I can recall) to include the Data class, for passing of 
information to the former Function::eval method, was for future thread safety. 

Previously we stored the Cell, and some other stuff, as a public accessible 
member, before we called eval during assemble. This was not thread safe. 
Instead we agreed on passing this data as argument, making it more thread 
safe. 

This might not be a big issue if we, when we implement support for threads 
(whenever this happens...) let the local Data object be stored in an indexed 
std::vector, and then keep the present eval interface.

Johan


Follow ups