mosolov_augmented_lagrangian2.icc

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

mosolov_augmented_lagrangian::mosolov_augmented_lagrangian()
: Bi(0), n(1), r(1), tol(1e-10), max_iter(1000000),
Xh(), Th(), lh(), a(), b(), inv_mt(), pa()
{}
void mosolov_augmented_lagrangian::reset (geo omega, string approx) {
Xh = space (omega, approx);
Xh.block ("boundary");
string grad_approx = "P" + itos(Xh.degree()-1) + "d";
Th = space (omega, grad_approx, "vector");
trial u (Xh), sigma(Th);
test v (Xh), tau (Th);
lh = integrate(2*v);
a = integrate (dot(grad(u),grad(v)));
b = integrate (dot(grad(u),tau));
integrate_option iopt;
iopt.invert = true;
inv_mt = integrate(dot(sigma,tau), iopt);
pa = problem (a);
}
void
mosolov_augmented_lagrangian::initial (field& sigma_h, field& uh) const {
uh = field(Xh);
uh ["boundary"] = 0;
pa.solve (lh, uh);
test tau (Th);
field mt_grad_uh = integrate(dot(grad(uh),tau));
sigma_h = inv_mt*mt_grad_uh;
}
void mosolov_augmented_lagrangian::put (odiststream& out,
field& sigma_h, field& uh) const
{
out << catchmark("Bi") << Bi << endl
<< catchmark("n") << n << endl
<< catchmark("r") << r << endl
<< catchmark("sigma") << sigma_h
<< catchmark("u") << uh;
}
mosolov_augmented_lagrangian::b
form b
Definition: mosolov_augmented_lagrangian.h:36
mosolov_augmented_lagrangian::Bi
Float Bi
Definition: mosolov_augmented_lagrangian.h:32
mosolov_augmented_lagrangian::reset
void reset(geo omega, string approx)
Definition: mosolov_augmented_lagrangian2.icc:29
rheolef::io::out
@ out
Definition: rheostream.h:167
mosolov_augmented_lagrangian::n
Float n
Definition: mosolov_augmented_lagrangian.h:32
field
see the field page for the full documentation
mosolov_augmented_lagrangian::put
void put(odiststream &out, field &sigma_h, field &uh) const
Definition: mosolov_augmented_lagrangian2.icc:53
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
mosolov_augmented_lagrangian::lh
field lh
Definition: mosolov_augmented_lagrangian.h:35
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
mosolov_augmented_lagrangian::Xh
space Xh
Definition: mosolov_augmented_lagrangian.h:34
a
Definition: diffusion_isotropic.h:25
mosolov_augmented_lagrangian::initial
void initial(field &sigma_h, field &uh) const
Definition: mosolov_augmented_lagrangian2.icc:45
lh
field lh(Float epsilon, Float t, const test &v)
Definition: burgers_diffusion_operators.icc:25
sigma
Definition: mosolov_exact_circle.h:40
test
see the test page for the full documentation
mosolov_augmented_lagrangian::pa
problem pa
Definition: mosolov_augmented_lagrangian.h:37
problem
see the problem page for the full documentation
u
Definition: leveque.h:25
mosolov_augmented_lagrangian::Th
space Th
Definition: mosolov_augmented_lagrangian.h:34
mosolov_augmented_lagrangian::inv_mt
form inv_mt
Definition: mosolov_augmented_lagrangian.h:36
u
Float u(const point &x)
Definition: transmission_error.cc:26
mkgeo_ball.b
b
Definition: mkgeo_ball.sh:152
mosolov_augmented_lagrangian::mosolov_augmented_lagrangian
mosolov_augmented_lagrangian()
Definition: mosolov_augmented_lagrangian2.icc:25
mkgeo_ball.n
n
Definition: mkgeo_ball.sh:150
trial
see the test page for the full documentation
rheolef::itos
std::string itos(std::string::size_type i)
itos: see the rheostream page for the full documentation
geo
see the geo page for the full documentation
rheolef::details::dot
rheolef::details::is_vec dot
mosolov_augmented_lagrangian::r
Float r
Definition: mosolov_augmented_lagrangian.h:32