Subject: [FEniCS-users] Weird error with dolfin::Function().get()

From: phil marinier <[email-masked]>
Date: Thu, 20 Aug 2009 11:33:02 -0400

Its actually the non-dynamic way to declare an array, and it has worked for me boefre, but you're right. I should be doing it with new. So I changed it to use new and delete, and still have the same problem.

However, I tried this program called valgrind, and apparently I have an invalid write of size 8, but the problem is my   new   statement, not the dolfin::Function. Apparently the Function doesn't work because its getting a bad vector, and apparently the vector is bad in such a way that the problem only shows up when I try to use it. 

I really sorry to have bothered you guys with this when it turns out it was my own code. Next time I'll use this valgrind program before I send you guys an email.

Thank you for your patience,

Phil

---

From: "Garth N. Wells" <[email-masked]>
Date: Thu, 20 Aug 2009 16:46:03 +0100

phil marinier wrote:
> **Its actually the non-dynamic way to declare an array, 

It's not correct because the value with which you're trying to 
initialise the array is not known at compile time.

Garth

and it has
> worked for me boefre, but you're right. I should be doing it with new. 
> So I changed it to use new and delete, and still have the same problem.
> 
> However, I tried this program called valgrind, and apparently I have an 
> invalid write of size 8, but the problem is my   new   statement, not 
> the dolfin::Function. Apparently the Function doesn't work because its 
> getting a bad vector, and apparently the vector is bad in such a way 
> that the problem only shows up when I try to use it.
> 
> I really sorry to have bothered you guys with this when it turns out it 
> was my own code. Next time I'll use this valgrind program before I send 
> you guys an email.
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> FEniCS-users mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/fenics-users