Redesign the umat in python
What happens in UMAT is simple: at its heart, the return-mapping-algorithm, solves a nonlinear system using the NR procedure. There are 48 unknowns/equations in this system. 24 are the amount of (plastic) slip and 24 are the plastic slip resistances. Because of the nonlinear nature of this system of equations, we solve this system by perturbing on unnkown at a time and form a jacobian, which we will use to update the values of the unknowns while iterating.
- If we can identify the forward pass in the UMAT (the one that we use as a starting point for perturbation), then we can implement that in pytorch. Then we can investigate if this forward pass will give us a gradient. If yes, we use this gradient to multiply with the residual vector
If the forward pass is successful, we get the jacobian, but to complete the NR-procedure, we will need to multiply the inverse of this jacobian with the residual vector. Can we do this inversion?
coverage run -m unittest discover coverage report -m
Implemented. Currently does not yield good results. It could easily result in nan values and currently is not used. At the moment relying on penalties and data loss to guide the search.
This is already taken care of with the inclusion of inverse-gamma relation.
Make the code flexible enough so it runs with optimizers from optim modules, the ad-hoc optimizer, where we zero parameters (that violate constraints) after each iteration.
This is not considered anymore since we have shifted to PINNs framework.
This is not considered anymore since we have shifted to PINNs framework.
All the umat routine are tested and verified (constants, construction and batch computation). Additional tests are written to ensure the computation in fortran and pytorch result in the same values.
A very wishy-washy explanation, based on what I took from Goodfelllow’s book: The main effect of L1-regularization is that the gradient does not scale with the value of parameters, as is the case with L2-regularization. Instead, we get unit gradients for each parameter of the optimization. This, combine with a large penalty coefficient, pushes the parameter to the boundaries (or beyond, which in that case, it is being projected back to the boundary) of the subspace that defines the permissible space for optimization. In short, there is a higher chance, although not guaranteed, that L1-regularization will lead to sparse parameter set than L2-regularization.
- How to include constraints in the formulation of LBFGS? This won’t be needed at the moment since our focus has shifted to compute the loss using PINNs approach. As such, solely optimizing the physical loss is no longer considered.
Add frequency for logging required data into tensorboard. Make sure that frequencies are provided for each logging item.
Try both gamma_dot equation in its original form and its inverse form. Add this to config_file as a switch
Autoregression code should run from any point in the code (parameter alpha which is between 0 and 1)
ACTION: Parameter alpha is an argument to the inference funcion now. Tested and works fine.
Autoregression computes both stress and gamma/slipres values. Find proper error indicators for gamma.
- delta gamma should be strictly non-negative
- slip resistance should be clipped between min and max slip resistance
ACTION: Both of these are implemented at both train and inference code.
- Try to see if relative error make sense. For example, as long as the physics loss is bigger than 10x data_loss don’t compute the physics loss
- Simply skip computing the physics loss for eg 100 iterations.