Skip to content

Commit

Permalink
Fix for #163
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Hellander committed May 30, 2017
1 parent 6ab5b86 commit ca7fc82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyurdme/pyurdme.py
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,7 @@ def export_to_vtk(self, species, folder_name):

#self._initialize_sol()
subprocess.call(["mkdir", "-p", folder_name])
fd = dolfin.File(os.path.join(folder_name, "trajectory.xdmf").encode('ascii', 'ignore'))
fd = dolfin.XDMFFile(os.path.join(folder_name, "trajectory.xdmf").encode('ascii', 'ignore'))
func = dolfin.Function(self.model.mesh.get_function_space())
func_vector = func.vector()
vertex_to_dof_map = self.get_v2d()
Expand All @@ -1759,7 +1759,7 @@ def export_to_vtk(self, species, folder_name):
solvector = self.get_species(species,i,concentration=True)
for j, val in enumerate(solvector):
func_vector[vertex_to_dof_map[j]] = val
fd << func
fd.write(func)

def export_to_xyx(self, filename, species=None, file_format="VMD"):
""" Dump the solution attached to a model as a xyz file. This format can be
Expand Down

0 comments on commit ca7fc82

Please sign in to comment.