← Back to team overview

dolfin team mailing list archive

[Bug 784774] Re: Saving tensor to compressed file in pvd format

 

** Changed in: dolfin
       Status: New => Confirmed

** Changed in: dolfin
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of DOLFIN
Team, which is subscribed to DOLFIN.
https://bugs.launchpad.net/bugs/784774

Title:
  Saving tensor to compressed file in pvd format

Status in DOLFIN:
  Confirmed

Bug description:
  This bug results in a malloc() memory corruption error. It occurs when attempting to save a tensor in compressed pvd format (something which works for scalar and vector quantities). The error is apparent when saving to (for example):
  efile = File("strain_rate.pvd", "compressed")

  When saving to an uncompressed file (e.g. efile =
  File("strain_rate.pvd")) , no error is observed.

  
  """
  CODE SNIPPET 
  """

  from dolfin import *

  # Load mesh from file
  mesh = Rectangle(0, 0, 1.0, 1.0, 10,10)

  # Define function spaces
  V = VectorFunctionSpace(mesh, "CG", 2)

  # Create function
  u1 = Function(V)

  # Create file for storing solution
  efile = File("strain_rate.pvd", "compressed")

  # Attempt to save strain rate to file
  eps_proj = project(sym(grad(u1)),TensorFunctionSpace(mesh,"CG",1))
  efile << eps_proj


References