NGS-Py Documentation

NGS-Py Documentation

Release 6.2 Joachim Schoeberl

Jul 10, 2018

Whetting the appetite

1 Poisson equation

3

2 Adaptive mesh refinement

5

3 Symbolic definition of forms : magnetic field

9

4 Navier Stokes Equation

13

5 Nonlinear elasticity

17

6 Working with CoefficientFunctions

19

7 Setting inhomogeneous Dirichlet boundary conditions

21

8 Define and update preconditioners

23

9 The Trace() operator

25

10 Vectors and matrices

27

10.1 Large Linear Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

11 Static condensation of internal bubbles

29

12 Discontinuous Galerkin methods

31

13 Parallel computing with NGS-Py

33

13.1 Shared memory parallelisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

13.2 Distributed memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

14 Interfacing to numpy/scipy

35

14.1 Working with small vectors and dense matrices: . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

14.2 Working with large vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

14.3 Working with sparse matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

14.4 Using iterative solvers from scipy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

15 Define and mesh 2D geometries

37

15.1 Curved boundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

15.2 Multiple subdomains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

15.3 Boundary condition markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

i

15.4 New features since Nov 2, 2015: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 15.5 New feature since Nov 26, 2015: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

16 Constructive Solid Geometry CSG

41

17 Working with meshes

43

18 Manual mesh generation

45

ii

NGS-Py Documentation, Release 6.2

Netgen/NGSolve 6 contains a rich Python interface. Program flow as well as geometry description and equation setup can be controlled from Python. You should be familiar with weak formulations of partial differential equations and the finite element method (NGSolve-oriented lecture notes are here: Scientific Computing) and the Python programming language. The interface to Python is inspired by the FEniCS project.

Whetting the appetite

1

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download