Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
streamf_cavity.icc
Go to the documentation of this file.
1
25void streamf_cavity_solver (const space& Xh, problem& pa, form& a, form& b) {
26 string valued = (Xh.size() == 3) ? "vector" : "scalar";
27 space Ph (Xh.get_geo(), "P2", valued);
28 Ph.block("top"); Ph.block("bottom");
29 size_t d = Xh.get_geo().dimension();
30 if (d == 3) {
31 Ph.block("back"); Ph.block("front");
32 } else {
33 Ph.block("left"); Ph.block("right");
34 }
35 trial u (Xh), psi (Ph); test phi (Ph);
36 a = (d == 3) ? integrate (ddot(grad(psi),grad(phi)))
37 : integrate ( dot(grad(psi),grad(phi)));
38 b = (d == 3) ? integrate (dot(curl(u),phi))
39 : integrate (curl(u)*phi);
40 pa = problem (a);
41}
42field streamf (const field& uh, const problem& pa, const form& a, const form& b) {
43 field lh = b*uh;
44 field psi_h (b.get_second_space(), 0);
45 pa.solve (lh, psi_h);
46 return psi_h;
47}
field lh(Float epsilon, Float t, const test &v)
see the field page for the full documentation
see the form page for the full documentation
see the problem 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
field streamf(const field &uh, const problem &pa, const form &a, const form &b)
void streamf_cavity_solver(const space &Xh, problem &pa, form &a, form &b)
Definition phi.h:25
Definition leveque.h:25