@@ -41,10 +41,6 @@ FFTMechanics::validParams()
41
41
params .addParam < TensorInputBufferName > ("applied_macroscopic_strain" ,
42
42
"Applied macroscopic strain" );
43
43
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." );
48
44
params .addParam < bool > ("verbose" , false, "Print non-linear residuals." );
49
45
return params ;
50
46
}
@@ -73,7 +69,6 @@ FFTMechanics::FFTMechanics(const InputParameters & parameters)
73
69
_applied_macroscopic_strain (isParamValid ("applied_macroscopic_strain" )
74
70
? & getInputBuffer ("applied_macroscopic_strain" )
75
71
: nullptr ),
76
- _hutchinson_steps (getParam < unsigned int > ("hutchinson_steps" )),
77
72
_verbose (getParam < bool > ("verbose" ))
78
73
{
79
74
// Build projection tensor once
@@ -134,14 +129,8 @@ FFTMechanics::computeBuffer()
134
129
// iterate as long as the iterative update does not vanish
135
130
for (const auto iiter : make_range (_nl_max_its ))
136
131
{
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
-
142
132
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 );
145
134
dFm = dFm_new ;
146
135
147
136
// update DOFs (array -> tens.grid)
0 commit comments