Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
cahouet-chabart.h
Go to the documentation of this file.
1
25#include "neumann-laplace-assembly.h"
27 cahouet_chabart (const space& Qh, Float lambda_1)
28 : fact_m(), fact_c(), lambda(lambda_1) {
29 form m (Qh, Qh, "mass");
30 fact_m = ldlt(m.uu);
31 trial p (Qh); test q (Qh);
32 form a = integrate (dot(grad(p),grad(q)));
33 form_diag dm (Qh, "mass");
34 field mh (dm);
35 csr<Float> c = neumann_laplace_assembly (a.uu, mh.u);
36 fact_c = ldlt(c);
37 }
38 vec<Float> solve (const vec<Float>& Mp) const {
39 vec<Float> q1 = fact_m.solve(Mp);
40 vec<Float> Mp_e (Mp.size()+1);
41 for (size_t i = 0; i < Mp.size(); i++) Mp_e.at(i) = Mp.at(i);
42 Mp_e.at(Mp.size()) = 0;
43 vec<Float> q2_e = fact_c.solve(Mp_e);
44 vec<Float> q2 (Mp.size());
45 for (size_t i = 0; i < q2.size(); i++) q2.at(i) = q2_e.at(i);
46 vec<Float> q = q1 + lambda*q2;
47 return q;
48 }
49 ssk<Float> fact_m;
50 ssk<Float> fact_c;
52};
see the Float page for the full documentation
see the field page for the full documentation
see the form page for the full documentation
see the space page for the full documentation
see the test page for the full documentation
see the test page for the full documentation
ssk< Float > fact_m
vec< Float > solve(const vec< Float > &Mp) const
cahouet_chabart(const space &Qh, Float lambda_1)
ssk< Float > fact_c
Definition sphere.icc:25