pkg load fem-fenics msh

problem = 'Biharmonic';
import_ufl_Problem (problem);

# Create mesh and define function space
x = y = linspace (0, 1, 33);
mesh = Mesh(msh2m_structured_mesh (x, y, 1, 1:4));

V = FunctionSpace(problem, mesh);

bc = DirichletBC (V, @(x,y) 0, 1:4);

f = Expression ('f', @(x,y) 4.0*pi^4.*sin(pi.*x).*sin(pi.*y));
g = Expression ('alpha', @(x,y) 8);

a = BilinearForm (problem, V, g);
L = LinearForm (problem, V, f);

[A, b] = assemble_system (a, L, bc);
u = A \ b;

func = Function ('u', V, u);
plot (func);
