view example/Biharmonic.m @ 89:d06b423169fa

The examples now follow the new naming convention.
author gedeone-octave <marcovass89@hotmail.it>
date Mon, 05 Aug 2013 13:20:12 +0200
parents 98297c182dfa
children 4f688918f76a
line wrap: on
line source

pkg load msh
pkg load fem-fenics

fem_init_env ();
problem = 'Biharmonic';
fem_create_all (problem);

x = y = linspace (0, 1, 32);
msho = msh2m_structured_mesh (x, y, 1, 1:4);
mshd = Mesh (msho);

V  = Biharmonic_FunctionSpace (mshd);

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 = Biharmonic_BilinearForm (V, bc, g);
b = Biharmonic_LinearForm (V, bc, f );

u = A \ b;


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