yield_slip_augmented_lagrangian.icc

The yield slip problem by the augmented Lagrangian method – solver function

#include "projection.h"
int yield_slip_augmented_lagrangian (Float S, Float n, Float Cf,
geo boundary, field lh, field& lambda_h, field& uh,
Float tol, size_t max_iter, Float r)
{
const space& Xh = uh.get_space();
const space& Wh = lambda_h.get_space();
trial u(Xh), lambda(Wh);
test v(Xh), mu(Wh);
form m = integrate (u*v),
a0 = integrate (dot(grad(u),grad(v))),
a = a0 + integrate (boundary, r*u*v),
mb = integrate (lambda*mu),
b = integrate (boundary, u*mu);
problem pa (a);
derr << "# k residue" << endl;
Float residue0 = 0;
for (size_t k = 0; true; ++k) {
field gamma_h = interpolate(Wh,
compose(projection(S,n,Cf,r), lambda_h + r*uh["boundary"]));
field delta_lambda_h = r*(uh["boundary"] - gamma_h);
lambda_h += delta_lambda_h;
Float residue = delta_lambda_h.max_abs();
derr << k << " " << residue << endl;
if (residue <= tol || k >= max_iter) return (residue <= tol) ? 0 : 1;
field rhs = lh + b.trans_mult(r*gamma_h - lambda_h);
pa.solve (rhs, uh);
}
}
form
see the form page for the full documentation
yield_slip_augmented_lagrangian
int yield_slip_augmented_lagrangian(Float S, Float n, Float Cf, geo boundary, field lh, field &lambda_h, field &uh, Float tol, size_t max_iter, Float r)
Definition: yield_slip_augmented_lagrangian.icc:26
field
see the field page for the full documentation
residue
field residue(Float p, const field &uh)
Definition: p_laplacian_post.cc:35
rheolef::integrate
std::enable_if< details::is_field_expr_v2_nonlinear_arg< Expr >::value &&! is_undeterminated< Result >::value, Result >::type integrate(const geo_basic< T, M > &omega, const Expr &expr, const integrate_option &iopt, Result dummy=Result())
see the integrate page for the full documentation
Definition: integrate.h:202
space
see the space page for the full documentation
rheolef::grad
std::enable_if< details::is_field_convertible< Expr >::value,details::field_expr_v2_nonlinear_terminal_field< typename Expr::scalar_type,typename Expr::memory_type,details::differentiate_option::gradient >>::type grad(const Expr &expr)
grad(uh): see the expression page for the full documentation
Definition: field_expr_terminal.h:911
rheolef::details::compose
class rheolef::details::field_expr_v2_nonlinear_node_unary compose
projection.h
The projection for yield-stress rheologies e.g. the yield slip problem.
a
Definition: diffusion_isotropic.h:25
rheolef::interpolate
field_basic< T, M > interpolate(const space_basic< T, M > &V2h, const field_basic< T, M > &u1h)
see the interpolate page for the full documentation
Definition: interpolate.cc:233
mkgeo_ugrid.boundary
boundary
Definition: mkgeo_ugrid.sh:181
lh
field lh(Float epsilon, Float t, const test &v)
Definition: burgers_diffusion_operators.icc:25
mkgeo_sector.m
m
Definition: mkgeo_sector.sh:118
test
see the test page for the full documentation
problem
see the problem page for the full documentation
u
Definition: leveque.h:25
Float
see the Float page for the full documentation
u
Float u(const point &x)
Definition: transmission_error.cc:26
mkgeo_ball.b
b
Definition: mkgeo_ball.sh:152
mkgeo_contraction.mu
mu
Definition: mkgeo_contraction.sh:193
mkgeo_ball.n
n
Definition: mkgeo_ball.sh:150
trial
see the test page for the full documentation
projection
Definition: projection.h:27
geo
see the geo page for the full documentation
rheolef::details::dot
rheolef::details::is_vec dot
lambda
Definition: yield_slip_circle.h:34