On Fri, 25 Mar 2016, Salazar De Troya, Miguel wrote:

> Is there any reason why PatchRecoveryError calls a threaded loop
> over the elements while JumpErrorEstimator does not?

I don't recall, but my guess would be: Patch recovery is more
expensive, so I bothered to thread it.  I'm lazy, so I stopped there.

> If I were to create a FEMContext for PatchRecoveryError and
> initialize it before the threaded loop in
> PatchRecoveryError::estimate_error(), could I have problems with
> race conditions?

Definitely.  You want a FEMContext per-thread.

> I cannot find a way to ensure that the patches do not contain
> elements in other threads, and if we were to reuse the patches, that
> would be assigning different error_estimators for the same element.

We set the error_per_cell values, we don't increment them, and we wrap
that setting in a scoped_lock to be doubly safe, so you should get a
valid error estimate on each element.  It won't be deterministic,
though; two different runs of the same problem could pull an element's
error estimate from two different patches depending on which thread
"got there first".
---
Roy

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to