Subject: [FEniCS-users] function assignment

From: Patrick Riesen <[email-masked]>
Date: Fri, 16 Oct 2009 15:14:22 +0200

hello

i'm running into an error when trying to copy a function by either

Function copy = orig;

or

Function copy(orig);

as

msof_init: 
/scratch-second/priesen/FEniCS/build/include/boost/smart_ptr/shared_ptr.hpp:412: 
typename boost::detail::shared_ptr_traits<T>::reference 
boost::shared_ptr< <template-parameter-1-1> >::operator*() const [with T 
= dolfin::GenericVector]: Assertion `px != 0' failed.

the backtrace is

#0  0x00007f98f774c07b in raise () from /lib/libc.so.6
#1  0x00007f98f774d84e in abort () from /lib/libc.so.6
#2  0x00007f98f7745af4 in __assert_fail () from /lib/libc.so.6
#3  0x00007f98fc291a09 in dolfin::Function::operator= 
(this=0x7fff047d2810, v=@0x7fff047d29c0) at 
/scratch-second/priesen/FEniCS/build/include/boost/smart_ptr/shared_ptr.hpp:412
#4  0x00007f98fc291d09 in Function (this=0x7fff047d2810, 
v=@0x7fff047d29c0) at dolfin/function/Function.cpp:113
#5  0x000000000041fd86 in main (argc=<value optimized out>, argv=<value 
optimized out>) at main.cpp:91

The function has values and the same space, so doing

Function copy(V);

copy.vector() = orig.vector();

is fine for me, but i guess the above should work as well?

best,
patrick

---

From: "Garth N. Wells" <[email-masked]>
Date: Fri, 16 Oct 2009 15:10:14 +0100

Register a bug on

    https://bugs.launchpad.net/dolfin

That way it won't get lost.

Garth

Patrick Riesen wrote:
> _______________________________________________
> FEniCS-users mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/fenics-users