MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / Do

Method Do

py_tutorials/ale.py:12–34  ·  view source on GitHub ↗
(self, heap)

Source from the content-addressed store, hash-verified

10class npALE(PyNumProc):
11
12 def Do(self, heap):
13 print ("ALE - Laplace")
14
15 pde = self.pde
16
17 d = pde.gridfunctions["def"]
18 d.Set(CoefficientFunction((2*y*(1-y)*x*(1-x),(3*y*(1-y)*x*(1-x)))))
19 pde.Mesh().SetDeformation (d)
20
21 u = pde.gridfunctions["u"]
22 # first test:
23 # u.Set(VariableCF("x"))
24
25
26 v = pde.spaces["v"]
27 a = pde.bilinearforms["a"]
28 f = pde.linearforms["f"]
29
30 a.Assemble()
31 f.Assemble()
32 inv = a.mat.Inverse(v.FreeDofs())
33
34 u.vec.data = inv * f.vec
35
36
37

Callers 9

scattering.pyFile · 0.45
vtkout.pyFile · 0.45
mpi_cmagnet.pyFile · 0.45
mpi_timeDG.pyFile · 0.45
mpi_poisson.pyFile · 0.45
d1_square.pyFile · 0.45
d5_beam.pyFile · 0.45
SolveBVPFunction · 0.45

Calls 4

InverseMethod · 0.80
CoefficientFunctionClass · 0.50
SetMethod · 0.45
AssembleMethod · 0.45

Tested by

no test coverage detected