examples/cohomology/cocycle.py
branchdev
changeset 244 66235db8d8b7
parent 1866d81d6ae7a3b
       1 --- a/examples/cohomology/cocycle.py	Tue Jan 05 11:02:07 2010 -0800
       2 +++ b/examples/cohomology/cocycle.py	Mon Jul 25 23:21:29 2011 -0700
       3 @@ -45,7 +45,7 @@
       4      if not (sum((D*v)**2) < tol and sum((D.T*v)**2) < tol):
       5          print "Expected a harmonic cocycle:", sum((D*v)**2), sum((D.T*v)**2) 
       6  
       7 -    return solution[0]        
       8 +    return solution[0], v
       9  
      10  
      11  def vertex_values(solution, vertices):
      12 @@ -77,7 +77,7 @@
      13      cocycle_list = read_list_file(cocycle_filename)
      14      vertexmap_list = read_list_file(vertexmap_filename)
      15  
      16 -    solution = smooth(boundary_list, cocycle_list)
      17 +    solution, v = smooth(boundary_list, cocycle_list)
      18      values = vertex_values(solution, vertexmap_list)
      19  
      20      outfn = os.path.splitext(cocycle_filename)[0] + '.val'