Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeat time step on assembly error #2730

Merged
merged 4 commits into from Dec 4, 2019

Conversation

@endJunction
Copy link
Member

endJunction commented Dec 1, 2019

Introduce explicit exception handling in the time loop/nonlinear-solver for failed assembly. In case of exception the time step will be repeated (if adaptive time stepping is used) with smaller time step size.
The exception is thrown in MFront material model when local integration fails.

  1. Feature description was added to the changelog
  2. Tests covering your feature were added?
  3. Any new feature or behavior change was documented? Not needed.
@endJunction endJunction requested a review from wenqing Dec 2, 2019
@wenqing
wenqing approved these changes Dec 2, 2019
Copy link
Member

wenqing left a comment

👍

@@ -11,6 +11,8 @@

#include <MGIS/Behaviour/Integrate.hxx>

#include "NumLib/Exceptions.h"

This comment has been minimized.

Copy link
@wenqing

wenqing Dec 2, 2019

Member

It might be good to move Exceptions.h to BaseLib or to ProcessLib/Utils by the name of AssemblyException.

This comment has been minimized.

Copy link
@endJunction

endJunction Dec 2, 2019

Author Member

BaseLib would be too much exposure, because these (that) exception(s) are used only on NumLib level.
ProcessLib/Utils would not work, because of the include in MaterialLib, causing a circular dependency.

This comment has been minimized.

Copy link
@wenqing

wenqing Dec 2, 2019

Member

I see. Then just keep it as it is.

@@ -313,7 +315,8 @@ MFront<DisplacementDim>::integrateStress(
auto const status = mgis::behaviour::integrate(v, _behaviour);
if (status != 1)
{
OGS_FATAL("Integration failed with status %i.", status);
throw NumLib::AssemblyException("Integration failed with status" +

This comment has been minimized.

Copy link
@wenqing

wenqing Dec 2, 2019

Member

Suggestion
Integration failed with ... --> MFront: Integration failed with ...

This comment has been minimized.

Copy link
@endJunction

endJunction Dec 2, 2019

Author Member

Good point. Will improve.
Done ✔️

@endJunction endJunction force-pushed the endJunction:RepeatTimeStepOnAssemblyError branch from 425874f to f51ef90 Dec 2, 2019
@endJunction endJunction marked this pull request as ready for review Dec 2, 2019
@endJunction

This comment has been minimized.

Copy link
Member Author

endJunction commented Dec 2, 2019

Test is added (oedometer test) but due to the nature of the output file name format the last time step has a different number.
Adding formatting possibility for the output file name would solve this problem....
Other ideas maybe?

<process_variable>displacement</process_variable>
</process_variables>
<secondary_variables>
<secondary_variable type="static" internal_name="ElasticStrain" output_name="ElasticStrain"/>

This comment has been minimized.

Copy link
@TomFischer

TomFischer Dec 4, 2019

Member
Suggested change
<secondary_variable type="static" internal_name="ElasticStrain" output_name="ElasticStrain"/>
<secondary_variable internal_name="ElasticStrain" output_name="ElasticStrain"/>
<process_variable>displacement</process_variable>
</process_variables>
<secondary_variables>
<secondary_variable type="static" internal_name="ElasticStrain" output_name="ElasticStrain"/>

This comment has been minimized.

Copy link
@TomFischer

TomFischer Dec 4, 2019

Member
Suggested change
<secondary_variable type="static" internal_name="ElasticStrain" output_name="ElasticStrain"/>
<secondary_variable internal_name="ElasticStrain" output_name="ElasticStrain"/>
Copy link
Member

TomFischer left a comment

Looks good.

endJunction added 4 commits Nov 28, 2019
This causes the time step to fail and repeated if possible.
Original test written by Vinay Kumar.
Needs output file name format which does not include
the time step number. Then a comparison on different
test environments will be possible.
Currently it fails because some platforms need say 400
time steps but other 398.
@endJunction endJunction force-pushed the endJunction:RepeatTimeStepOnAssemblyError branch from f51ef90 to 20d2b0a Dec 4, 2019
@endJunction endJunction merged commit 465ddc5 into ufz:master Dec 4, 2019
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/jenkins/pr-merge This commit is being built
Details
deploy/netlify Deploy preview ready!
Details
ufz.ogs #20191204.6 succeeded
Details
@endJunction endJunction deleted the endJunction:RepeatTimeStepOnAssemblyError branch Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.