Loading...
Searching...
No Matches
yield_slip_augmented_lagrangian.icc

The yield slip problem by the augmented Lagrangian method – solver function.

The yield slip problem by the augmented Lagrangian method – solver function

#include "projection.h"
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)
{
const space& Xh = uh.get_space();
const space& Wh = lambda_h.get_space();
trial u(Xh), lambda(Wh);
test v(Xh), mu(Wh);
form m = integrate (u*v),
a0 = integrate (dot(grad(u),grad(v))),
a = a0 + integrate (boundary, r*u*v),
mb = integrate (lambda*mu),
b = integrate (boundary, u*mu);
problem pa (a);
derr << "# k residue" << endl;
Float residue0 = 0;
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;
Float residue = delta_lambda_h.max_abs();
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);
}
}
lh
field lh(Float epsilon, Float t, const test &v)
Definition burgers_diffusion_operators.icc:25
Float
see the Float page for the full documentation
field
see the field page for the full documentation
form
see the form page for the full documentation
geo
see the geo page for the full documentation
problem
see the problem page for the full documentation
space
see the space page for the full documentation
test
see the test page for the full documentation
trial
see the test page for the full documentation
residue
field residue(Float p, const field &uh)
Definition p_laplacian_post.cc:35
projection.h
The projection for yield-stress rheologies e.g. the yield slip problem.
lambda
Definition yield_slip_circle.h:34
projection
Definition projection.h:27
u
Definition leveque.h:25
yield_slip_augmented_lagrangian
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)
Definition yield_slip_augmented_lagrangian.icc:26