Mercurial > fem-fenics-eugenio
view inst/example/Biharmonic/Biharmonic.m @ 164:7190852cf57f
Update the examples giving two input parameters to the BilinearForm.
author | gedeone-octave <marcovass89@hotmail.it> |
---|---|
date | Sat, 05 Oct 2013 10:40:06 +0100 |
parents | d03d998e64af |
children | e85390ed620d |
line wrap: on
line source
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, V, g); L = LinearForm (problem, V, f); [A, b] = assemble_system (a, L, bc); u = A \ b; func = Function ('u', V, u); plot (func);