Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
mosolov_augmented_lagrangian1.icc
Go to the documentation of this file.
1
25#include "vector_projection.h"
27 test v(Xh);
28 derr << "# k residue" << endl;
29 for (size_t k = 0; true; ++k) {
30 field grad_uh = inv_mt*(b*uh);
31 auto c = compose(vector_projection(Bi,n,1,r), norm(sigma_h+r*grad_uh));
32 field gamma_h = lazy_interpolate(Th, c*(sigma_h + r*grad_uh));
33 field delta_sigma_h = r*(grad_uh - gamma_h);
34 sigma_h += delta_sigma_h;
35 Float residue = delta_sigma_h.max_abs();
36 derr << k << " " << residue << endl;
37 if (residue <= tol || k >= max_iter) {
38 derr << endl << endl;
39 return (pow(residue,3) <= tol) ? 0 : 1;
40 }
41 field rhs = (1/r)*(lh - integrate(dot(sigma_h - r*gamma_h, grad(v))));
42 pa.solve (rhs, uh);
43 }
44}
see the Float page for the full documentation
see the field page for the full documentation
see the test page for the full documentation
field residue(Float p, const field &uh)
int solve(field &sigma_h, field &uh) const
The projection for yield-stress rheologies – vector-valued case for the Mossolov problem.