-
Notifications
You must be signed in to change notification settings - Fork 258
Make deviator() and second_invariant() consistent with plane strain assumption in 2D #6471
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
base: main
Are you sure you want to change the base?
Conversation
|
Others know this area much better than me, but in any case, this deserves a changelog entry. |
gassmoeller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for tackling these questions. I left a few comments. I think this is the right approach, but there are still some places that compute the deviatoric strain rate as strain rate - 1/dim * trace, please fix those as well.
In light of the discussion in #6434 I think this is the right path forward, but like Wolfgang commented, please add a changelog entry. And we will likely have to update a lot of test results.
source/material_model/grain_size.cc
Outdated
| } | ||
|
|
||
| const double strain_rate_dependence = (1.0 - dislocation_creep_exponent[phase_index]) / dislocation_creep_exponent[phase_index]; | ||
| const SymmetricTensor<2,dim> shear_strain_rate = strain_rate - 1./dim * trace(strain_rate) * unit_symmetric_tensor<dim>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here we still compute the shear strain rate as strain_rate -1./dim *trace. Does this need to be changed as well? If so, there are several places in the code base where we compute the shear strain rate in this way. Please search for /dim in ASPECT's directories and check which places need fixes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for pointing this out. I found two more 1/dim * trace expressions in material models, and they are all replaced by Utilities::Tensors::deviator(). Also, a changelog is added for these modifications.
tests/spiegelman_fail_test.cc
Outdated
| compute_second_invariant(const SymmetricTensor<2,dim> strain_rate, const double min_strain_rate) const | ||
| compute_Utilities::Tensors::deviatoric_tensor_inv2(const SymmetricTensor<2,dim> strain_rate, const double min_strain_rate) const | ||
| { | ||
| const double edot_ii_strict = std::sqrt(strain_rate*strain_rate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we have a different way to compute the second invariant here? This way of computing the invariant also appears in the spiegelman benchmark cases. We should figure out in which way this is identical or different to the previous form.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's worth mentioning that @cedrict and I looked into this at some point in the past and found that people have all sorts of incompatible definitions of the second invariant. Sometimes it included a factor of 2, sometime it didn't, and similar shenanigans. I would suggest sticking closely to the definition we had previously used, and only change 1/dim to 1/3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this is my miss.
tests/spiegelman_fail_test.cc
Outdated
| { | ||
| public: | ||
| double compute_second_invariant(const SymmetricTensor<2,dim> strain_rate, const double min_strain_rate) const; | ||
| double compute_Utilities::Tensors::deviatoric_tensor_inv2(const SymmetricTensor<2,dim> strain_rate, const double min_strain_rate) const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you probably didnt mean to rename this function, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it is my mistake. I just used a script to replace the string second_invariant by Utilities::Tensors::deviatoric_tensor_inv2 in all the files.
Do you think the second invariant of strain rate tensor should be changed here? I do not know if Spiegelman use a special function here (the function calculates the norm of the strain rate tensor).
gassmoeller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few more thoughts I had after the review.
| * strain assumption when dim = 2. Specifically, the second invariant of the deviatoric | ||
| * stress tensor $\tau_{II}$ in 2D is given by $\tau_{II} = -\frac{1}{2}(\tau_{11}^2 + | ||
| * \tau_{22}^2 + \tau_{33}^2 + 2\tau_{12}^2) = -\frac{1}{2}[\tau_{11}^2 + \tau_{22}^2 + | ||
| * (\tau_{11} + \tau_{22})^2 + 2\tau_{12}^2]$ under the plane strain assumption. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add one sentence that in 3D this function simply returns the usual second invariant.
| * deal.II, this function is consistent with the plane strain assumption when dim = 2. | ||
| * Specifically, the deviator of the stress tensor $\mathbf\tau$ in 2D is given by | ||
| * $\text{dev}(\mathbf\tau) = \mathbf\tau - \frac{1}{3}\text{trace}(\mathbf\tau)\mathbf 1$ | ||
| * under the plane strain assumption. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add one sentence that in 3D this returns the usual definition of a deviatoric tensor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comments for the two functions are revised accordingly.
include/aspect/utilities.h
Outdated
| */ | ||
| template <int dim> | ||
| double | ||
| deviatoric_tensor_inv2(const SymmetricTensor<2,dim> &input); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am unsure about this name, maybe second_invariant_plane_strain would explain better what the purpose of this function is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not know. I agree that plane_strain should be added to the name, but deviatoric should also be added, because the function returns the correct result only when the input tensor is deviatoric. Yet, we are not able to check if the input tensor is deviatoric, for the deviator of 2D plane strain tensor is not "deviatoric" in the common sense...
|
Completion of this PR is harder than expected. Currently there are two major problems:
|
gassmoeller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few small comments I saw while reading through the PR.
|
|
||
| const SymmetricTensor<2, dim> | ||
| edot_deviator = deviator(strain_rate) + 0.5 * stress_0_advected / elastic_viscosity | ||
| edot_deviator = strain_rate + 0.5 * stress_0_advected / elastic_viscosity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this the place where you removed the deviator on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I think we need to be more careful when using consistent_deviator(), since we cannot apply it more than once to a symmetric tensor. I move the deviator here to the place where it is called --- MaterialModel::Rheology::ViscoPlastic::compute_isostrain_viscosities (`source/material_model/rheology/visco_plastic.cc, line 310). But I need to think this over, because under this change the Newton assembler gets the full strain rate instead of deviatoric strain rate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, is the name of the variable now wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So instead of strain_rate it should be something like consistent_deviator_of_strain_rate or just deviatoric_strain_rate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this comment is not addressed yet. The name of the variable is edot_deviator, but it now uses the full strain rate. Does that name of the variable have to be changed?
| return t; | ||
| } | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add another empty line here
| return output; | ||
| } | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and another empty line here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I also add another empty line between to_voigt_stiffness_vector and levi_civita to make the format consistent.
|
|
||
| if (enable_elasticity) | ||
| data.local_rhs(i) += ( deviator(elastic_out->elastic_force[q]) | ||
| data.local_rhs(i) += ( elastic_out->elastic_force[q] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this no longer the deviatoric force?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I do not know. But the Stokes also uses the full elastic force, and the deviatoric elastic force does not produce sharp shear bands in the strip footing test. I need some time to figure out why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What did you find?
|
A plan forward for this PR that I just discussed with @YiminJin:
We want to make sure this PR is tested and merged before the next release, since it fixes an important bug in the current implementation. |
|
@gassmoeller The reasons for removing the
I know it contradicts my modifications on the Newton assembler last year, but I cannot remember why I use deviatoric strain rate at that time...
The comments above are only simple analyses. I think our final choice should depend on experiments. I am working on it. |
|
Sorry, I was wrong again: |
|
You already found out that Moreover, we have Both lines of the argument indicate that the system matrix is symmetric. |
|
I am trying out the benchmark in Spiegelman et al. (2016) with the modifications in this PR and #6546 . As a first step, I use the visco plastic model and the same material parameters as in |
|
hmm, that means they have been broken somewhere along the way. Just checking, have you tried running the original files and material model here: https://github.com/geodynamics/aspect/tree/main/benchmarks/newton_solver_benchmark_set/spiegelman_et_al_2016? |
Yes. I only changed the refinement level from 4 to 6. |
adbca51 to
79e2084
Compare
|
I derived the analytical expression of the system Jacobian under plane-strain assumption for DP rheology, and I think I have found the reason for the different convergence behaviors with and without stabilization shown in #6160 . The derivation is provided in the following document: In one word, the reason for the better performance of using deviatoric strain rate when SPD stabilization is turned on is that: when using the full strain rate, the Jacobian matrix is not semi-positive-definite, and we need a smaller scaling factor to restore the positive-definiteness. However, I think we should use the full strain rate even if it slows down the convergence rate, because it is correct (if we use the deviatoric strain rate, it would be equivalent to modifying the rheological model). I made some modifications in The shear bands are still not as sharp as those in the original paper of Fraters et al. (2019), but are similar to those in Spiegelman et al. (2016). Surprisingly, the nonlinear solver converges to I also plotted the convergence curves with low-resolution models: What is your opinion about my modifications @gassmoeller @MFraters ? If they are acceptable, I think it is time to apply the differences in test results and prepare for the final merge. |
|
Corrections:
The curves are almost the same as those plotted in #6160 (this time we use full strain rate when assembling the system Jacobian).
It converges to about 3e-6. The strain rate field now is very similar to Fig. 3 in the original paper. |
MFraters
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing all this work! That is great.
Do I understand it correctly that the convergence plot you show should be the same as the bottom left one in figure 5?
The stabilization definitely looks better, even though, looking at the Picard iteration the problems is more difficult, since that one is not converging.
Do you have the same plots for the more difficult cases? It would be interesting to see how it behaves there.
source/utilities.cc
Outdated
| double consistent_second_invariant_of_deviatoric_tensor(const SymmetricTensor<2,dim> &t) | ||
| { | ||
| if (dim == 2) | ||
| return -( Utilities::fixed_power<2,double>(t[0][0]) // t11^2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not simply t[0][0]*t[0][0]?
Same in other places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought fixed_power() saves an addition operation for
But I think you are right. I read the source codes of fixed_power() and now I think it may cost more (there are if-else statements, and I am not sure if it will be optimized by the compiler). So I changed to the simpler form, as you suggested.
|
@MFraters The convergence behaviors for more difficult cases are shown below: It can be seen that the convergence behavior of the current code is better indeed: the unstabilized Newton solver converges for the difficult cases with second-order rate. However, without stabilization the linear solver takes more iterations to converge, and in the most difficult case (Vel = 12.5 mm/y) the cheap iterations are even exhausted. So it is still worth using the stabilization in larger models. |
|
Supplement to my comments on my derivation of the analytical formula of system Jacobian: The derivation is under plane-strain assumption, but the conclusion also applies to the original 2D formulation. In the original 2D formulation, we have |
|
Eq. (9) in my derivation is calculated with the help of Sympy. The python codes are shown below: The outputs are: It is easy to see that the expressions with and without plane-strain are equal to |
MFraters
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good to me. A few small comments to clear things up.
I don't see a significant difference in the unstabilized convergence when it converges (maybe I am missing something), but the stabilized one is definitely better.
Can you fix the tests? Than we can also see what difference it makes there.
@bangerth, can you have a look at the derivations?
| const double regularization_adjustment = (ref_visc * ref_visc) | ||
| / (ref_visc * ref_visc + 2.0 * ref_visc * drucker_prager_viscosity | ||
| + drucker_prager_viscosity * drucker_prager_viscosity); | ||
| / Utilities::fixed_power<2,double>(ref_visc + drucker_prager_viscosity); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am personally not really a fan of using functions like this for something so simple. You are basically inlining the following code here: https://github.com/dealii/dealii/blob/93160909dbf3bbfe986ad5320b675737f89d6e00/include/deal.II/base/utilities.h#L944-L961
Since it is an inline constexpr, and with compiler optimizations, it is probably almost as fast, or as fast as writing it out yourself. You can argue both ways about which one is more clear to read, so it is fine to keep it, but I did want to mention it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not read the source code of Utilities::fixed_power() when I made the change. Now I think you are right: using the function may not be faster. I have changed it to explicit form in a new commit.
| @@ -0,0 +1,5 @@ | |||
| Changed: The deviator and second invariant of symmetric tensors are modified to | |||
| be consistent with the plane strain assumption in 2D. It changes the outputs of | |||
| compressible material models that are dependent on the deviatoric strain rate. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I fully understand this. Currently the Newton solver is only stabilized for the incompressible case. Did you mean incompressible or do you say it is now also stabilized for the compressible case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forget why I wrote this. I deleted the second sentence in a new commit.
|
|
||
| const SymmetricTensor<2, dim> | ||
| edot_deviator = deviator(strain_rate) + 0.5 * stress_0_advected / elastic_viscosity | ||
| edot_deviator = strain_rate + 0.5 * stress_0_advected / elastic_viscosity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So instead of strain_rate it should be something like consistent_deviator_of_strain_rate or just deviatoric_strain_rate?
|
|
||
| if (enable_elasticity) | ||
| data.local_rhs(i) += ( deviator(elastic_out->elastic_force[q]) | ||
| data.local_rhs(i) += ( elastic_out->elastic_force[q] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What did you find?
|
I tried the default model runs (using
a. Always use full strain rate (FSR): b. Use full strain rate when not stabilized, and use deviatoric strain rate (DSR) when stabilized: The figures correspond to Fig. 2 in the original paper: The results can be summarized as follows:
b. Use FSR when not stabilized, and use DSR when stabilized: The figures correspond to Fig. 4 in the original paper:
The results show that:
I have not figured out why using deviatoric strain rate results in slower convergence in the channel flow benchmark. But, according to the results and the mathematical work, using full strain rate seems to be the right choice. That is also the reason I changed deviatoric strain rate to full strain the in elastic rheology. There is an issue to be noticed: when using 2D tensor, one can use What do you think about the results @MFraters @bangerth @gassmoeller ? Do I need to carry out experiments with elastic rheology? (I have tested the full strain rate version with associated-plastic-flow tests (strip-footing, pure shear), but not the deviatoric strain rate version). |
|
Sorry, I made a big mistake in the last comment: I forgot that the 2D tensors in the channel flow benchmark have not been changed to plane-strain tensors. When I tried to do the modification, I found something that looks weird: line 183 and line 189 of |
|
I also made a mistake when computing the deviatoric strain rates in system Jacobian: I forgot to change @gassmoeller Do you remember how we came to the conclusion that using deviatoric strain rate when stabilized is faster than using full strain rate? |
|
I have tried to test the VEP rheology with plastic dilation, and I found some problems in
I also found that the Newton Stokes assembler uses After fixing all the problems, and adding a And, from the compressible case, I confirmed the argument that we should use full strain rate in |
|
@YiminJin Concerning the deviatoric strain rate: I think the relevant PR where I tested this was #6159 (comment), and in particular this code: https://github.com/geodynamics/aspect/pull/6159/files#diff-67a939b674da49b34479b331895052a08d8712da7befddadaba9390cd782ee05R183. As far as I can tell we did not decide to use the deviatoric strain rate for the stabilized version because it is faster, it seems like there was a theoretical argument that the stabilization factor was only safe if applied to a deviatoric strain rate. In other words the guarantee that the stabilization makes the matrix positive definite is only valid if the used strain rate is deviatoric. But I have to say I dont remember the details or if I ever made that derivation myself (I would guess I accepted it from the paper or some earlier PR discussion). From looking at the earlier PR my main point was that we need to use the full strain rate for the unstabilized version in order to guarantee the expected convergence rate of the Newton method. If your version here works with the full strain rate for both versions so much the better. |
|
I apologize for making so many mistakes during the discussion. During the morning meeting, the documentation and the conclusion were correct, but I failed to explain it. I added some comments to the derivation to make it clearer: Yet, I understand that we should use full strain rate does not mean that using full strain rate is faster, because using full strain rate breaks the symmetry and semi-positive-definiteness of the top-left block. I have tested the Spiegelman benchmark and the result show that using full strain rate (without stabilization) leads to a little more linear iterations but much fewer nonlinear iterations (similar to the results shown in #6160 ). But one benchmark is not enough. @MFraters Could you help me with the nonlinear channel flow benchmark? I do not know if I misunderstand your implementation. |
That is normal. I really appreciate all the work you put into this!
This is a difficult one. In the end the Newton derivatives do not decide whether you converge to the correct solution, only how fast. So in the end for us, it doesn't matter too much what the "correct" method of computing the derivative is, but what derivative results in the the fastest and most reliable convergence. The problem you state is that method which results in the fastest convergence (full strain-rate) is not the same as the method which results in the most reliable convergence (deviatoric strain rate) in the unstabilized case.
The difference in the amount of failure cases (2 vs 3) seems minimal to me. I think there is a third thing we should look at, which is not converging to the tolerance. Based on your figures, it seems to me that using the full strain-rate has a higher chance of actually converging to the required tolerance. So, based on these results, I would say my preference is on the full strain-rate.
Could be, although it seems systematic. Maybe it could have something to do with whether every point is the cell is guaranteed to be divergence free, or just the cell as a whole. @bangerth, do you have an idea?
Sure, could you be a bit more specific what the issue is? In general, there are two version, one with a prescribed velocity (input_v.prm) and one with a prescribed traction (input_t.prm). You need to run cmake to compile the material model and then you should be able to use the run script. |
|
@MFraters Thank you for the detailed comment! I prefer the full strain rate too. The issue with the nonlinear channel flow benchmark (with prescribed velocity) is that: line 183 and line 189 of |
gassmoeller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting all the effort into this! I will take another look at the main changes again, but here are a few small comments for now.
| Changed: The deviator and second invariant of symmetric tensors are modified to | ||
| be consistent with the plane strain assumption in 2D. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a sentence about which models will be affected? E.g.:
| Changed: The deviator and second invariant of symmetric tensors are modified to | |
| be consistent with the plane strain assumption in 2D. | |
| Fixed: The deviator and second invariant of symmetric tensors were modified to | |
| be consistent with the plane strain assumption in 2D. This fixes a bug | |
| in the strain rate and strain rate invariant computation of many material | |
| models for compressible 2D models. It also results in better | |
| nonlinear solver convergence due to some fixes to the Newton solver. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for providing a nice example! However, there are some statements I am not quite sure of:
- I do not know if the original implementation should be called a ``bug'', since ASPECT has never declared that it applies plane-strain assumption in 2D.
- The modifications do not only changes compressible models, but also models including prescribed dilation. Basically, all the material models that calls
deviator()are affected.
Based on these points, I modified the statements a little in a new commit. Please help me revise them if the words are inappropriate.
|
|
||
| const SymmetricTensor<2, dim> | ||
| edot_deviator = deviator(strain_rate) + 0.5 * stress_0_advected / elastic_viscosity | ||
| edot_deviator = strain_rate + 0.5 * stress_0_advected / elastic_viscosity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this comment is not addressed yet. The name of the variable is edot_deviator, but it now uses the full strain rate. Does that name of the variable have to be changed?
| effective_strain_rate = elastic_out->viscoelastic_strain_rate[q]; | ||
| else if ((this->get_newton_handler().parameters.velocity_block_stabilization & Newton::Parameters::Stabilization::PD) != Newton::Parameters::Stabilization::none) | ||
| effective_strain_rate = deviator(effective_strain_rate); | ||
| effective_strain_rate = Utilities::Tensors::consistent_deviator(effective_strain_rate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you opened that pull request we also added the file stokes_matrix_free_global_coarsening. Could you fix it there as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for finding the flaws. The variable name has been fixed.
The GMG solver requires more attention. Besides changing deviatoric strain rate to full strain rate, I found two other problems:
- The Newton derivatives related to the volumetric part is missing;
- When material averaging is set to none, the Newton scheme does not work because the uninitialized
viscosity_derivative_averaging_weightsare assembled into the system.
I fixed the problems in a new commit. However, I cannot make the strip footing model run with GMG solver. The Kaus benchmark (with

The prm file is:
kaus_2010_extension.prm.txt
It can be seen that adding the volumetric part does not lead to a big improvement in convergence rate (except for the 18th nonlinear iteration). Nevertheless, I feel it is safer to follow the ``correct'' formula.
Please let me know if there are problems in my codes, or more benchmarks to run.





















This PR modifies the functions
deviator()andsecond_invariant()to make them consistent with the plane strain assumption in 2D. The modified functions are placed in namespaceUtilities::Tensors. For details of the mathematics, please refer to #6434 and #6459. A direct impact of this modification is that it sharpen the shear bands in plastic models with nonzero dilation angle.This PR is a follow-up of #6373, but it will affect other material models. Also, we need several test problems to show the plane strain functions work well (or to find out if we can do better), which have not been implemented. Please make comments if you have suggestions or questions about this PR.