Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
yield_slip_augmented_lagrangian.icc
Go to the documentation of this file.
1
25#include "projection.h"
27 geo boundary, field lh, field& lambda_h, field& uh,
28 Float tol, size_t max_iter, Float r)
29{
30 const space& Xh = uh.get_space();
31 const space& Wh = lambda_h.get_space();
32 trial u(Xh), lambda(Wh);
33 test v(Xh), mu(Wh);
34 form m = integrate (u*v),
35 a0 = integrate (dot(grad(u),grad(v))),
36 a = a0 + integrate (boundary, r*u*v),
37 mb = integrate (lambda*mu),
38 b = integrate (boundary, u*mu);
39 problem pa (a);
40 derr << "# k residue" << endl;
41 Float residue0 = 0;
42 for (size_t k = 0; true; ++k) {
43 field gamma_h = lazy_interpolate(Wh,
44 compose(projection(S,n,Cf,r), lambda_h + r*uh["boundary"]));
45 field delta_lambda_h = r*(uh["boundary"] - gamma_h);
46 lambda_h += delta_lambda_h;
47 Float residue = delta_lambda_h.max_abs();
48 derr << k << " " << residue << endl;
49 if (residue <= tol || k >= max_iter) return (residue <= tol) ? 0 : 1;
50 field rhs = lh + b.trans_mult(r*gamma_h - lambda_h);
51 pa.solve (rhs, uh);
52 }
53}
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 form 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.
Definition leveque.h:25
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)