int main(
int argc,
char**argv) {
Float tol = (argc > 1) ? atof(argv[1]) : 1e-15;
const space& Xhs = us_h.get_space();
const space& Zh = zeta_h.get_space();
const geo& omega = Xhs.get_geo();
size_t k = Xhs.degree() - 1,
d = omega.dimension();
string Pkd = "P"+to_string(k)+"d",
Pld = (argc > 2) ? argv[2] : Pkd;
Mh (omega["sides"], Pkd);
test v(Xh), mu (Mh), vs(Xhs), xi (Zh);
form as = integrate (dot(grad_h(us),
A(
d)*grad_h(vs)));
form bs = integrate (us*xi);
form inv_m = integrate (
u*v, iopt);
field pi_Xh_u = inv_m*llh;
pms.solve (rhs, pi_Mh_lambda);
field lh = integrate (dot(grad_h(pi_Xh_u),
A(
d)*grad_h(vs))
+ on_local_sides((pi_Mh_lambda-pi_Xh_u)
*dot(normal(),
A(
d)*grad_h(vs))));
field kh = integrate (pi_Xh_u*xi);
Float err_us = rus.max_abs();
Float err_z = rz.max_abs();
derr << "err_us = " << err_us << endl;
derr << "err_z = " << err_z << endl;
derr << "|zeta_h| = " << zeta_h.max_abs() << endl;
return (max(max(err_us,err_z), zeta_h.max_abs()) < tol) ? 0 : 1;
}
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 geo 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
Tensor diffusion – isotropic case.
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
This file is part of Rheolef.
rheolef - reference manual
The sinus product function.