The Mossolov problem – residue analysis.
int main(
int argc,
char**argv) {
Float tol = (argc > 1) ? atof(argv[1]) : 1e-12;
space Th = sigma_h.get_space();
space Xh = uh.get_space();
form a = integrate(dot(grad(
u),grad(v)));
form b = integrate(dot(grad(
u),tau));
form inv_mt = integrate(dot(
sigma,tau), iopt);
field grad_uh = inv_mt*(b*uh);
field r_sigma_h = lazy_interpolate(Th, grad_uh - c*sigma_h);
field mr_uh =
lh - b.trans_mult(sigma_h-r*grad_uh) - r*(a*uh);
mr_uh["boundary"] = 0;
pm.solve (mr_uh, r_uh);
Float residue_uh = sqrt(m(r_uh,r_uh));
Float residue_sigma_h = sqrt(mt(r_sigma_h,r_sigma_h));
derr << "norm_linf residue(uh) = " << r_uh.max_abs() << endl
<< "norm_l2 residue(uh) = " << residue_uh << endl
<< "norm_linf residue(sigma_h) = " << r_sigma_h.max_abs() << endl
<< "norm_l2 residue(sigma_h) = " << residue_sigma_h << endl;
}
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 problem page for the full documentation
see the catchmark page for the full documentation
see the environment page for the full documentation
see the integrate_option 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
This file is part of Rheolef.
field residue(Float p, const field &uh)
rheolef - reference manual
The projection for yield-stress rheologies – vector-valued case for the Mossolov problem.