Rheolef
7.2
an efficient C++ finite element environment
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 =
lazy_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
u
point u(const point &x)
Definition:
diffusion_transport_tensor_exact.icc:25
mkgeo_ball.b
int b
Definition:
mkgeo_ball.sh:152
mkgeo_ball.n
int n
Definition:
mkgeo_ball.sh:150
mkgeo_ball.a
int a
Definition:
mkgeo_ball.sh:151
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::has_field_rdof_interface< 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:930
rheolef::lazy_interpolate
field_basic< T, M > lazy_interpolate(const space_basic< T, M > &X2h, const field_basic< T, M > &u1h)
see the interpolate page for the full documentation
Definition:
field.h:871
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:211
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.
lambda
Definition:
yield_slip_circle.h:34
projection
Definition:
projection.h:27
u
Definition:
leveque.h:25
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