@@ -41,10 +41,6 @@ FFTMechanics::validParams()
4141 params .addParam < TensorInputBufferName > ("applied_macroscopic_strain" ,
4242 "Applied macroscopic strain" );
4343 params .addParam < TensorInputBufferName > ("F" , "F" , "Deformation gradient tensor." );
44- params .addParam < unsigned int > ("hutchinson_steps" ,
45- 0 ,
46- "Steps for diagonal estimation with Hutchinson's method used in "
47- "Jacobi preconditioning. 0 skips preconditioning." );
4844 params .addParam < bool > ("verbose" , false, "Print non-linear residuals." );
4945 return params ;
5046}
@@ -73,7 +69,6 @@ FFTMechanics::FFTMechanics(const InputParameters & parameters)
7369 _applied_macroscopic_strain (isParamValid ("applied_macroscopic_strain" )
7470 ? & getInputBuffer ("applied_macroscopic_strain" )
7571 : nullptr ),
76- _hutchinson_steps (getParam < unsigned int > ("hutchinson_steps" )),
7772 _verbose (getParam < bool > ("verbose" ))
7873{
7974 // Build projection tensor once
@@ -134,14 +129,8 @@ FFTMechanics::computeBuffer()
134129 // iterate as long as the iterative update does not vanish
135130 for (const auto iiter : make_range (_nl_max_its ))
136131 {
137- const auto diag_precond =
138- _hutchinson_steps ? torch ::abs (estimateJacobiPreconditioner (G_K_dF , b , _hutchinson_steps ))
139- : torch ::ones_like (b );
140- const auto M_inv = [& diag_precond ](const torch ::Tensor & x ) { return x / diag_precond ; };
141-
142132 const auto [dFm_new , iterations , lnorm ] =
143- _hutchinson_steps ? conjugateGradientSolve (G_K_dF , b , dFm , _l_tol , _l_max_its , M_inv )
144- : conjugateGradientSolve (G_K_dF , b , dFm , _l_tol , _l_max_its );
133+ conjugateGradientSolve (G_K_dF , b , dFm , _l_tol , _l_max_its );
145134 dFm = dFm_new ;
146135
147136 // update DOFs (array -> tens.grid)
0 commit comments