---------- Forwarded message ----------
From: Lorenzo Botti <[EMAIL PROTECTED]>
Date: 3-apr-2008 12.42
Subject: Re: [Libmesh-users] Problems with
write_serialized_blocked_dof_objects() and subactive elements
To: Roy Stogner <[EMAIL PROTECTED]>


> > I have a problem with
 > System::write_serialized_blocked_dof_objects(...).
 > > When the mesh has subactive node ids written_length doesn't match
 > > vec_length and so I write wrong solution and vectors.
 > > I have some questions.
 > > Can a non coarsened mesh have subactive elements or subactive node ids?
 > >
 >
 >  No.


Ok, no subactive elements.
 The problem is that mesh.n_nodes() != not_subactive_node_ids
 (calculated with MeshTools::get_not_subactive_node_ids()).

 void MeshTools::get_not_subactive_node_ids(const MeshBase& mesh,
     std::set<unsigned int>& not_subactive_node_ids)
  {
   MeshBase::const_element_iterator el           = mesh.elements_begin();
   const MeshBase::const_element_iterator end_el = mesh.elements_end();
   for( ; el != end_el; ++el)
   {
     Elem* elem = (*el);
     if(!elem->subactive())
       for (unsigned int n=0; n<elem->n_nodes(); ++n)
         not_subactive_node_ids.insert(elem->node(n));
   }
 }

 The problem is that there are no subactive elem and elem->node(n) is
 never == Node::invalid_id. There could be different nodes with the
 same id?
 The right answer is no, is it?
 Maybe we have some active elem that should be ancestor?
 Do you have any other idea?

 Because of this in System::write_serialized_blocked_dof_objects(...)
 written_lenght match with not_subactive_node_ids, not with vec_lenght
 (vec_lenght == n_nodes()) and so the written solution is wrong.
 In previous releases of system_io.C this doesn't happen because the
 old function write_data() write to file the solution with a loop on
 not_subactive_node_ids.

 Thanks

Lorenzo

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to