The Mossolov problem by the augmented Lagrangian method.
The Mossolov problem by the augmented Lagrangian method
int main(
int argc,
char**argv) {
string approx = (argc > 2) ? argv[2] : "P1";
pb.
Bi = (argc > 3) ? atof(argv[3]) : 0.2;
pb.
n = (argc > 4) ? atof(argv[4]) : 1;
size_t n_adapt = (argc > 5) ? atoi(argv[5]) : 0;
pb.
max_iter = (argc > 6) ? atoi(argv[6]) : 10000;
pb.err = (argc > 7) ? atof(argv[7]) : 1e-4;
pb.hmin = 1e-4;
pb.hmax = 1e-1;
pb.ratio = 3;
pb.additional = "-AbsError";
for (size_t i = 0; true; i++) {
pb.
reset (omega, approx);
int status = pb.
solve (sigma_h, uh);
pb.
put (out, sigma_h, uh);
if (i == n_adapt) break;
space T0h (sigma_h.get_geo(),
"P"+to_string(sigma_h.get_space().degree())+
"d");
field ch = lazy_interpolate (T0h, sqrt(abs(dot(sigma_h, grad(uh)))));
omega = adapt (ch, pb);
omega.save();
}
}
see the field page for the full documentation
see the geo page for the full documentation
see the environment page for the full documentation
odiststream: see the diststream page for the full documentation
see the space page for the full documentation
The Mossolov problem by the augmented Lagrangian method – solver class header.
This file is part of Rheolef.
rheolef - reference manual
void reset(geo omega, string approx)
int solve(field &sigma_h, field &uh) const
void put(odiststream &out, field &sigma_h, field &uh) const
void initial(field &sigma_h, field &uh) const