Ok - I got it sorted. The call to add_point() was just allowing the mesh to assign the node an id... but that's not exactly what we want.... we actually want it to have the same node id that node has in the copied mesh.
So I just used this call to add_point instead:
Node *newn = this->add_point(*oldn, oldn->id(), oldn->processor_id());
That fixed it and my code runs fine now.
Derek
On Apr 11, 2011, at 10:13 AM, Roy Stogner wrote:
>
> On Mon, 11 Apr 2011, Derek Gaston wrote:
>
>> Just tried to make a copy of a ParallelMesh... and got a segfault in
>> UnstructuredMesh::copy_nodes_and_elements(). I'm going to go ahead
>> and dive in... but I thought I would see if you had any thoughts on
>> whether or not I should expect the copy constructor for ParallelMesh
>> to work... or if there is some philosophical reason why it won't
>> ever work.
>
> No philosophical reason, but probably some oversight: it's easy to
> write mesh code that assumes no sparsity and then get bitten by that
> assumption later.
>
> Glancing at the code I don't see an obvious problem, though...
> ---
> Roy
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Libmesh-devel mailing list
> Libmesh-devel@...
> https://lists.sourceforge.net/lists/listinfo/libmesh-devel
|