Did I find the right examples for you? yes no      Crawl my project      Python Jobs

# NeumannBound.NeumannBound

All Samples(11)  |  Call(6)  |  Derive(0)  |  Import(5)
```Stores and manages all boundary edges requiring *generalized*
Neumann boundary conditions of the form:

*Note* that the above BCs differ from the usual Neumann
boundary conditions n.grad v = alpha by the tensor F!

Data Structure (a dictionary): { (i1,i2): n*F*grad(v) ,...}
(i1,i2) represents a line segment from node number i1 to i2(more...)
```

```from ellipt2d import ellipt2d
from DirichletBound import DirichletBound
from NeumannBound import NeumannBound
from Triangulate import Triangulate
import Tkinter
```
```		db = [(0.,0.) for i in range(len(listofpts))]  # pseudo-Neumann in fact

nb = NeumannBound(start={})

# We could apply zero Neumman on the outer circle,
```

```from ellipt2d import ellipt2d
from DirichletBound import DirichletBound
from NeumannBound import NeumannBound
import reg2tri, superlu
from math import sin, cos, pi
```
```for i in range(nx1):
db[i] = 0.
nb = NeumannBound()
for i in range((ny1-1)*nx1, ny1*nx1-1):
x = grid.x(i)
```

```from Triangulate import Triangulate
from ellipt2d import ellipt2d
from NeumannBound import NeumannBound
import superlu
from math import sqrt
```
```        self.Amat, self.rhs = self.equ.stiffnessMat()
# Neumann BCs
self.nb = NeumannBound()
attrs = self.grd['attributes']
for e in self.grd['edges']:
```

```from ellipt2d import ellipt2d
from DirichletBound import DirichletBound
from NeumannBound import NeumannBound
import reg2tri
import vector
```
```	    db[i] = 4.0

nb = NeumannBound()  # Neumann boundary condition set on one segment.

nb[(nx1,(2)*nx1)] = 3.0
```

```from ellipt2d import ellipt2d
from DirichletBound import DirichletBound
from NeumannBound import NeumannBound
import reg2tri
from math import sin, cos, pi
```

```        dB[i] = float(i)

nb = NeumannBound.NeumannBound()
nb[(nx1*ny1-2,nx1*ny1-1)] = 3.0

```

```        dB[i] = complex(i)