Skip to content

Commit 0ecff2a

Browse files
committed
doesnt work
1 parent ad308f2 commit 0ecff2a

File tree

3 files changed

+1
-16
lines changed

3 files changed

+1
-16
lines changed

examples/degeus_mechanics/mech.i

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
constitutive_model = hyper_elasticity
7373
stress = stress
7474
applied_macroscopic_strain = applied_strain
75-
hutchinson_steps = 6
7675
verbose = true
7776
[]
7877
[]

include/tensor_computes/FFTMechanics.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ class FFTMechanics : public TensorOperator<>
6464
/// applied macroscopic (affine) strain
6565
const torch::Tensor * const _applied_macroscopic_strain;
6666

67-
/// steps for diagonal estimation
68-
const unsigned int _hutchinson_steps;
69-
7067
/// add diagnostic output for iterations
7168
const bool _verbose;
7269

src/tensor_computes/FFTMechanics.C

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)