gzz-commits
[Top][All Lists]

## [Gzz-commits] libvob/lava/blob fshape.py

 From: Janne V. Kujala Subject: [Gzz-commits] libvob/lava/blob fshape.py Date: Fri, 23 May 2003 10:07:51 -0400

```CVSROOT:        /cvsroot/libvob
Module name:    libvob
Changes by:     Janne V. Kujala <address@hidden>        03/05/23 10:07:51

Modified files:
lava/blob      : fshape.py

Log message:
experiment with the optimization problem

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/lava/blob/fshape.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: libvob/lava/blob/fshape.py
diff -u libvob/lava/blob/fshape.py:1.1 libvob/lava/blob/fshape.py:1.2
--- libvob/lava/blob/fshape.py:1.1      Fri May 23 08:30:50 2003
+++ libvob/lava/blob/fshape.py  Fri May 23 10:07:51 2003
@@ -28,7 +28,7 @@
import sys
import RandomArray

-length= 3
+length= 100
epsilon = 0.0001

# print l
@@ -41,7 +41,7 @@

def U(xleft, xright, rleft, rright):

-    return A(xleft, xright, rleft, rright) + L(xleft, xright, rleft, rright)
+    return A(xleft, xright, rleft, rright) +3* L(xleft, xright, rleft, rright)

def pot(x, r):
@@ -70,8 +70,8 @@
dudr[:-1] += dudrl

dudx = r * 0
-    dudx[1:] += dudxr
-    dudx[:-1] += dudxl
+    #dudx[1:] += dudxr
+    #dudx[:-1] += dudxl

return (u, dudx, dudr)

@@ -125,14 +125,12 @@
self.mom *= self.brake

sur = []
-for i in range(1, 4):
+for i in range(1, 2):
l = 3**i
tl = l * length
print "TL",tl
x = zeros(2*tl, Float)
-    x[0] = -l/2.0
-    x[1:tl-1] = arange(tl-2) * (l/(tl-3.0)) - l/2.0
-    x[tl-1] = l/2.0
+    x[0:tl] = arange(tl) * 1.0 / tl * l
x[tl] = 0.5
x[-1] = 0.5
mi = MomGrad(minfunc, x)

```

reply via email to