Am Freitag, den 26.08.2011, 09:09 -0500 schrieb Roy Stogner:
> 
> On Fri, 26 Aug 2011, robert wrote:
> 
> > probably not - it's the first time that I am working in parallel so I
> > don't know how to do it yet.
> 
> Instead of this:
> 
> >  MeshBase::const_element_iterator       el     =
> > mesh.active_local_elements_begin();
> >  const MeshBase::const_element_iterator end_el =
> > mesh.active_local_elements_end();
> 
> You want to iterate from elements_begin() to elements_end()


ok, thanks. 

Did I get it right that looping through the elements is not done in
parallel then? 


I am also asking because when I use the results of the old calculation
to set up the starting conditions for the new one I do something like: 

        ///MeshBase::const_node_iterator       nd     =
new_mesh.local_nodes_begin();
    ///const MeshBase::const_node_iterator end_nd =
new_mesh.local_nodes_end(); 
    
MeshBase::const_node_iterator       nd     = new_mesh.nodes_begin();
const MeshBase::const_node_iterator end_nd = new_mesh.nodes_end(); 

        for ( ; nd != end_nd ; ++nd ){    
                
                    
            Node *nod = *nd;
                Real x,y,z;

                x = nod->operator()(0);
                y = nod->operator()(1);
                z = nod->operator()(2);
                

                unsigned int nod_dof = nod->dof_number(0,0,0);

                
                double shift = 0.;
                Point point;
                
        // shiftx, shifty, shiftz are parameters due to geologic event
        // Is maybe not the most elegant way but it works

                point = Point( x + shiftx , y + shifty , z+shiftz );
                
                Number u_p = old_system.point_value (0, point); 
        
        //      old_mesh.clear_point_locator();  
        // do I need the point locator? seems to make it slower

                
                if (nod_dof < T_system.n_dofs())  
                        T_system.solution->set(nod_dof,u_p);

        }


I know, the point_value is quite slow and using it within the nodes loop
is maybe not the best thing to do. 
Short explanation: due to a volcanic event some points in the earth's
crust are moving. Since the event happens fastly these points should
keep their temperature ... blablabla

Do you have any suggestions to improve the above code??

thank you very much, 
Robert



> ---
> Roy



------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to