The yield slip problem by the augmented Lagrangian method – solver function.
{
const space& Xh = uh.get_space();
const space& Wh = lambda_h.get_space();
form m = integrate (
u*v),
a0 = integrate (dot(grad(
u),grad(v))),
a = a0 + integrate (boundary, r*
u*v),
b = integrate (boundary,
u*mu);
derr << "# k residue" << endl;
for (size_t k = 0; true; ++k) {
field gamma_h = lazy_interpolate(Wh,
compose(
projection(S,n,Cf,r), lambda_h + r*uh[
"boundary"]));
field delta_lambda_h = r*(uh[
"boundary"] - gamma_h);
lambda_h += delta_lambda_h;
derr << k <<
" " <<
residue << endl;
if (residue <= tol || k >= max_iter)
return (
residue <= tol) ? 0 : 1;
field rhs =
lh + b.trans_mult(r*gamma_h - lambda_h);
pa.solve (rhs, uh);
}
}
field lh(Float epsilon, Float t, const test &v)
see the Float page for the full documentation
see the field page for the full documentation
see the geo page for the full documentation
see the problem page for the full documentation
see the space page for the full documentation
see the test page for the full documentation
see the test page for the full documentation
field residue(Float p, const field &uh)
The projection for yield-stress rheologies e.g. the yield slip problem.
int yield_slip_augmented_lagrangian(Float S, Float n, Float Cf, geo boundary, field lh, field &lambda_h, field &uh, Float tol, size_t max_iter, Float r)