Open orlandini opened 3 years ago
Before entering the error computation, NEvalErrors() should be polled for all materials involved. If a material returns a different number of errors, DebugStop() should be called
That seems good.
Currently we have the following code at pzinterpolationspace.cpp
:
Which can then be used as a guideline for the following checks:
TPZAnalysis::PostProcessError
:before switching between serial and parallel approaches:
TPZMatError
interfaceTPZMatError::NEValErrors
Once we perform these checks, we could then clean a lot of code (mostly calls to TPZVec::Resize
, but also a few other checks) from:
@philippedevloo are you ok with this? any input?
any updates @karolinneoc ?
The error vector is resized several times during the computation of the error. The SBFem unit test has revealed that, if a thread does not compute errors for any element, its corresponding error vector will not be resize thus leading to an error (threads with error vectors of different sizes).
Any suggestions on how to set the size of the error vec? Since it depends on the material, perhaps we could check if all the materials in the mesh have the same value for
int TPZMatError::NEvalErrors()
and get this value before we actually start the error processing.