Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
mosolov_augmented_lagrangian2.icc
Go to the documentation of this file.
1
26: Bi(0), n(1), r(1), tol(1e-10), max_iter(1000000),
27 Xh(), Th(), lh(), a(), b(), inv_mt(), pa()
28{}
29void mosolov_augmented_lagrangian::reset (geo omega, string approx) {
30 Xh = space (omega, approx);
31 Xh.block ("boundary");
32 string grad_approx = "P" + to_string(Xh.degree()-1) + "d";
33 Th = space (omega, grad_approx, "vector");
34 trial u (Xh), sigma(Th);
35 test v (Xh), tau (Th);
36 lh = integrate(2*v);
37 a = integrate (dot(grad(u),grad(v)));
38 b = integrate (dot(grad(u),tau));
39 integrate_option iopt;
40 iopt.invert = true;
41 inv_mt = integrate(dot(sigma,tau), iopt);
42 pa = problem (a);
43}
44void
46 uh = field(Xh);
47 uh ["boundary"] = 0;
48 pa.solve (lh, uh);
49 test tau (Th);
50 field mt_grad_uh = integrate(dot(grad(uh),tau));
51 sigma_h = inv_mt*mt_grad_uh;
52}
53void mosolov_augmented_lagrangian::put (odiststream& out,
54 field& sigma_h, field& uh) const
55{
56 out << catchmark("Bi") << Bi << endl
57 << catchmark("n") << n << endl
58 << catchmark("r") << r << endl
59 << catchmark("sigma") << sigma_h
60 << catchmark("u") << uh;
61}
field lh(Float epsilon, Float t, const test &v)
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
void put(odiststream &out, field &sigma_h, field &uh) const
void initial(field &sigma_h, field &uh) const
Definition leveque.h:25