Mercurial > fem-fenics-eugenio
changeset 6:93c8ee6a546f
Maint: moove the file to the test folder
author | gedeone-octave <marco.vassallo@outlook.com> |
---|---|
date | Fri, 05 Jul 2013 18:18:37 +0200 |
parents | e74ff416fd54 |
children | 2b8b66f72a3d |
files | laplace.m |
diffstat | 1 files changed, 0 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/laplace.m Fri Jul 05 18:16:21 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -#Example of how we expect the Octave interface to look like -#This file is our test for the TDD - -# Create mesh -init_dolfin (); - -x = y = linspace (0, 1, 32) ; -msho = msh2m_structured_mesh (x, y, 1, [ 1 1 2 2 ]) -mshd = dolfin_mesh (msho); - -#Compile the problem defined in the .ufl file -ffc ("Laplace.ufl"); - -#Import the problem inside Octave -V = FunctionSpace (mshd, "Laplace"); -sd = SubDomain (mshd, @(x, y) abs (x - 1.0) < eps, "Laplace"); -bc = DirichletBC (V, @(x, y) 0.0, sd, "Laplace"); - -#Get the matrices -A = BilinearForm (V, V, bc, "Laplace"); -L = LinearForm (V, bc, "Laplace"); - -#Solve it -u = A\L; - -#Plot -uf = Function (V, u); -dolfin_plot (uf, "Solution")