/usr/share/doc/freefem3d/examples/stokes.ff is in freefem3d 1.0pre10-3.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | // -*- c++ -*-
// This file is part of ff3d - http://www.freefem.org/ff3d
// Copyright (C) 2003 Laboratoire J.-L. Lions UPMC Paris
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// $Id: stokes.ff,v 1.5 2005/11/28 00:54:32 delpinux Exp $
// Stokes equations
vector n = (20,20,20);
vertex A = (0,0,0);
vertex B = (1,1,1);
scene S = pov("stokes.pov");
mesh M = structured(n,A,B);
domain Omega = domain(S,outside(<1,0,0>));
function teta0 = 0;
double eps = 1e-5;
solve(u1,u2,u3,p) in Omega by M
krylov(precond=diagonal,type=bicg),
cg(epsilon=1e-5) {
test(U1,U2,U3,P)
int(grad(u1)*grad(U1) - p*dx(U1)
+grad(u2)*grad(U2) - p*dy(U2)
+grad(u3)*grad(U3) - p*dz(U3)
-eps*grad(p)*grad(P) - eps*p*P
-dx(u1)*P - dy(u2)*P - dz(u3)*P) = 0;
u1 = 0 on M xmin;
u1 = 0 on M xmax;
u1 = 0 on M ymin;
u1 = 1 on M ymax;
u1 = 0 on M zmin;
u1 = 0 on M zmax;
u1 = 0 on <1,0,0>;
u2 = 0 on M;
u2 = 0 on <1,0,0>;
u3 = 0 on M;
u3 = 0 on <1,0,0>;
};
// Post-processing
mesh T = tetrahedrize(Omega,M);
save(medit,"stokes-u",T);
save(medit,"stokes-u",[u1, u2, u3],T);
save(medit,"stokes-p",T);
save(medit,"stokes-p",p,T);
|