yield_slip_augmented_lagrangian.icc
Go to the documentation of this file.
#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);
}
}
lh
field lh(Float epsilon, Float t, const test &v)
Definition: burgers_diffusion_operators.icc:25
Float
see the Float page for the full documentation
field
see the field page for the full documentation
form
see the form page for the full documentation
geo
see the geo page for the full documentation
problem
see the problem page for the full documentation
space
see the space page for the full documentation
test
see the test page for the full documentation
trial
see the test page for the full documentation
mkgeo_ball.b
int b
Definition: mkgeo_ball.sh:152
mkgeo_ball.n
int n
Definition: mkgeo_ball.sh:150
mkgeo_contraction.mu
mu
Definition: mkgeo_contraction.sh:193
mkgeo_sector.m
m
Definition: mkgeo_sector.sh:118
mkgeo_ugrid.boundary
int boundary
Definition: mkgeo_ugrid.sh:181
rheolef::details::compose
class rheolef::details::field_expr_v2_nonlinear_node_unary compose
rheolef::details::dot
rheolef::details::is_vec dot
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::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
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
residue
field residue(Float p, const field &uh)
Definition: p_laplacian_post.cc:35
projection.h
The projection for yield-stress rheologies e.g. the yield slip problem.
a
Definition: diffusion_isotropic.h:25
lambda
Definition: yield_slip_circle.h:34
projection
Definition: projection.h:27
u
Definition: leveque.h:25
u
Float u(const point &x)
Definition: transmission_error.cc:26
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