mosolov_augmented_lagrangian1.icc

The Mossolov problem by the augmented Lagrangian method – solver class body

#include "vector_projection.h"
int mosolov_augmented_lagrangian::solve (field& sigma_h, field& uh) const {
test v(Xh);
derr << "# k residue" << endl;
for (size_t k = 0; true; ++k) {
field grad_uh = inv_mt*(b*uh);
auto c = compose(vector_projection(Bi,n,1,r), norm(sigma_h+r*grad_uh));
field gamma_h = interpolate(Th, c*(sigma_h + r*grad_uh));
field delta_sigma_h = r*(grad_uh - gamma_h);
sigma_h += delta_sigma_h;
Float residue = delta_sigma_h.max_abs();
derr << k << " " << residue << endl;
if (residue <= tol || k >= max_iter) {
derr << endl << endl;
return (pow(residue,3) <= tol) ? 0 : 1;
}
field rhs = (1/r)*(lh - integrate(dot(sigma_h - r*gamma_h, grad(v))));
pa.solve (rhs, uh);
}
}
Float
see the Float page for the full documentation
field
see the field page for the full documentation
test
see the test page for the full documentation
mkgeo_ball.c
int c
Definition: mkgeo_ball.sh:153
rheolef::details::compose
class rheolef::details::field_expr_v2_nonlinear_node_unary compose
rheolef::details::dot
rheolef::details::is_vec dot
rheolef::norm
T norm(const vec< T, M > &x)
norm(x): see the expression page for the full documentation
Definition: vec.h:387
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
rheolef::pow
space_mult_list< T, M > pow(const space_basic< T, M > &X, size_t n)
Definition: space_mult.h:120
residue
field residue(Float p, const field &uh)
Definition: p_laplacian_post.cc:35
mosolov_augmented_lagrangian::inv_mt
form inv_mt
Definition: mosolov_augmented_lagrangian.h:36
mosolov_augmented_lagrangian::pa
problem pa
Definition: mosolov_augmented_lagrangian.h:37
mosolov_augmented_lagrangian::Bi
Float Bi
Definition: mosolov_augmented_lagrangian.h:32
mosolov_augmented_lagrangian::Xh
space Xh
Definition: mosolov_augmented_lagrangian.h:34
mosolov_augmented_lagrangian::lh
field lh
Definition: mosolov_augmented_lagrangian.h:35
mosolov_augmented_lagrangian::n
Float n
Definition: mosolov_augmented_lagrangian.h:32
mosolov_augmented_lagrangian::solve
int solve(field &sigma_h, field &uh) const
Definition: mosolov_augmented_lagrangian1.icc:26
mosolov_augmented_lagrangian::tol
Float tol
Definition: mosolov_augmented_lagrangian.h:32
mosolov_augmented_lagrangian::r
Float r
Definition: mosolov_augmented_lagrangian.h:32
mosolov_augmented_lagrangian::b
form b
Definition: mosolov_augmented_lagrangian.h:36
mosolov_augmented_lagrangian::Th
space Th
Definition: mosolov_augmented_lagrangian.h:34
mosolov_augmented_lagrangian::max_iter
size_t max_iter
Definition: mosolov_augmented_lagrangian.h:33
vector_projection
Definition: vector_projection.h:26
vector_projection.h
The projection for yield-stress rheologies – vector-valued case for the Mossolov problem.