getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Getfem-users] Commit 4120


From: Roman Putanowicz
Subject: Re: [Getfem-users] Commit 4120
Date: Wed, 25 Jul 2012 20:35:39 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

> Shouldn't we go through all class members and try to copy as much as
> possible? The copy constructor of the mesh_fem class is a very
> fundamental point in getfem, we should make sure that the new
> constructor is as compatible as possible to the previous behavior.
> Kostas
> 
Dear All, 

I think what Kostas say is very important.

In the attachment I have a simple example I wrote to illustrate
the issue with context dependencies and copy constructor.
It creates a class Foo that inherits from  getfem::context_dependencies
and allows to see the pointers stored for context.

I have created Master, Slave and Master2 objects. Master and Master2 
depend on Slave. Master2 is copy of Master (default copy constructor).
As you can see the dependent object list for Slave has not been updated
to account for Master2.

On my machine the output looks like :

-------------------------------------------------8<---------
Dependent objects for Master 0xbfd0dbb0: 
     No depentend objects
Dependencies objects for Master 0xbfd0dbb0: 
   0xbfd0db88

 --------------

Dependent objects for Slave 0xbfd0db88: 
   0xbfd0dbb0
Dependencies objects for Slave 0xbfd0db88: 
     No dependencies objects

 --------------

Dependent objects for Master 0xbfd0db60: 
     No depentend objects
Dependencies objects for Master 0xbfd0db60: 
   0xbfd0db88

-------------------------------------------------8<---------

Of course name for Master2 is also wrong (the name for 0xbfd0db60
should be Master2).

This is the issue -- I will look how to fix it unless someone 
is quicker than me (I am going for holidays on Friday with no coputer :-). 
I have to understand what the method
void sup_dependency(const context_dependencies &cd) does --
it looks like it suppres the dependency, so the combination
of  add_dependency() and sup_dependency()  should do the job.
However I have to draw the dependency tree on paper to be sure
I understand whole issue.

This is all for now.

Regards,

Roman

-- 
Roman Putanowicz, PhD  < address@hidden  >
Institute for Computational Civil Engng (L-5)
Dept. of Civil Engng, Cracow Univ. of Technology
www.l5.pk.edu.pl, tel. +48 12 628 2569, fax 2034

Attachment: ContextShow.cxx
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]