Roy, 

probably not - it's the first time that I am working in parallel so I
don't know how to do it yet. 

Would be great if you could give me a hint. 

Thanks in advance, 
Robert

Here function I am using: 





  std::cout << "set boundary_id's ...";
  
  
  MeshBase& MB (mesh);
  MB.find_neighbors();  // otherwise the function elem->neighbor(s)
would always return NULL
    
  std::vector<Real> max = find_max_xyz(mesh);
  std::vector<Real> min = find_min_xyz(mesh);
        
  MeshBase::const_element_iterator       el     =
mesh.active_local_elements_begin();
  const MeshBase::const_element_iterator end_el =
mesh.active_local_elements_end(); 

  for ( ; el != end_el; ++el)
  {    
      Elem* elem = *el;
      
          for (unsigned int s=0; s<elem->n_sides(); s++){
          if (elem->neighbor(s) == NULL){
                        

                        AutoPtr<Elem> side = elem->side(s); 
                    int _links  = 0; int _rechts = 0; 
                    int _unten  = 0; //int _oben   = 0;
                    int _vorne  = 0; int _hinten = 0;

                        for (unsigned int i=0; i<side->n_nodes(); i++){
                                Node* nod = side->get_node(i);
                                Real x,y,z;
                                x = nod->operator()(0);
                                y = nod->operator()(1);
                                z = nod->operator()(2);
                                
                                if (x <= min.at(0)+1e-8) {
                                        _links++;
                                        mesh.boundary_info->add_node (nod, 3);  
        }
                                if (x >= max.at(0)-1e-8) {
                                        _rechts++;
                                        mesh.boundary_info->add_node (nod, 1);  
        }
                                if (y <= min.at(1)+1e-8) {
                                        _vorne++;
                                        mesh.boundary_info->add_node (nod, 4);  
        }
                                if (y >= max.at(1)-1e-8) {
                                        _hinten++;
                                        mesh.boundary_info->add_node (nod, 5);  
        }
                                if (z <= min.at(2)+1e-8) {
                                        _unten++;
                                        mesh.boundary_info->add_node (nod, 0);  
        }
                                if (z >= max.at(2)-1e-8) {
                                        mesh.boundary_info->add_node (nod, 2);  
        }
                                
                        }

                        
                        if ( _links == side->n_nodes())
                                mesh.boundary_info->add_side (elem,s, 3);
                        else if (_rechts == side->n_nodes() )
                                mesh.boundary_info->add_side (elem,s, 1);
                        else if (_unten == side->n_nodes() )
                                mesh.boundary_info->add_side (elem,s, 0);  
                        else if (_vorne == side->n_nodes() )
                                mesh.boundary_info->add_side (elem,s, 4);
                        else if (_hinten == side->n_nodes() )
                            mesh.boundary_info->add_side (elem,s, 5);
                        else
                            mesh.boundary_info->add_side (elem,s, 2);
                                
                    //  std::cout << mesh.boundary_info->boundary_id (elem,s) <<
std::endl;//= 0;
                  }
          }
      
  }
^std::cout << "\t\t\t\t\tdone"<<std::endl;



Am Freitag, den 26.08.2011, 08:29 -0500 schrieb Roy Stogner:
> On Fri, 26 Aug 2011, robert wrote:
> 
> > is it possible that the boundary_ids have something to do with my
> > problem?
> > During the calculation I manually set the boundary ids by:
> >
> > mesh.boundary_info->add_node (nod, idval);
> > mesh.boundary_info->add_side (elem,s, idval);
> 
> Are you doing this consistently on every processor?
> ---
> Roy



------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to