scikit-FEM-LMLPHP

from skfem import *

m = MeshTri()
m.refine(4) e = ElementTriP1()
basis = InteriorBasis(m, e) @bilinear_form
def laplace(u, du, v, dv, w):
return du[0]*dv[0] + du[1]*dv[1] @linear_form
def load(v, dv, w):
return 1.0*v A = asm(laplace, basis)
b = asm(load, basis) I = m.interior_nodes() x = 0*b
x[I] = solve(*condense(A, b, I=I)) m.plot3(x)
m.show()

  

Please see the directory examples for more instructions.

Contributors

04-13 14:36