Rheolef  7.1
an efficient C++ finite element environment
cahouet-chabart.h

The Cahouet-Chabart preconditioner for the Navier-Stokes equations

#include "neumann-laplace-assembly.h"
cahouet_chabart (const space& Qh, Float lambda_1)
: fact_m(), fact_c(), lambda(lambda_1) {
form m (Qh, Qh, "mass");
fact_m = ldlt(m.uu);
trial p (Qh); test q (Qh);
form_diag dm (Qh, "mass");
field mh (dm);
csr<Float> c = neumann_laplace_assembly (a.uu, mh.u);
fact_c = ldlt(c);
}
vec<Float> solve (const vec<Float>& Mp) const {
vec<Float> q1 = fact_m.solve(Mp);
vec<Float> Mp_e (Mp.size()+1);
for (size_t i = 0; i < Mp.size(); i++) Mp_e.at(i) = Mp.at(i);
Mp_e.at(Mp.size()) = 0;
vec<Float> q2_e = fact_c.solve(Mp_e);
vec<Float> q2 (Mp.size());
for (size_t i = 0; i < q2.size(); i++) q2.at(i) = q2_e.at(i);
vec<Float> q = q1 + lambda*q2;
return q;
}
ssk<Float> fact_m;
ssk<Float> fact_c;
};
form
see the form page for the full documentation
cahouet_chabart::lambda
Float lambda
Definition: cahouet-chabart.h:51
field
see the field page for the full documentation
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
mkgeo_ball.c
c
Definition: mkgeo_ball.sh:153
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
p
Definition: sphere.icc:25
cahouet_chabart
Definition: cahouet-chabart.h:26
a
Definition: diffusion_isotropic.h:25
rheolef::details::dot
rheolef::details::is_vec dot
cahouet_chabart::solve
vec< Float > solve(const vec< Float > &Mp) const
Definition: cahouet-chabart.h:38
mkgeo_sector.m
m
Definition: mkgeo_sector.sh:118
test
see the test page for the full documentation
Float
see the Float page for the full documentation
cahouet_chabart::fact_c
ssk< Float > fact_c
Definition: cahouet-chabart.h:50
trial
see the test page for the full documentation
cahouet_chabart::fact_m
ssk< Float > fact_m
Definition: cahouet-chabart.h:49
lambda
Definition: yield_slip_circle.h:34
cahouet_chabart::cahouet_chabart
cahouet_chabart(const space &Qh, Float lambda_1)
Definition: cahouet-chabart.h:27