---------- Forwarded message ----------
From: John Peterson <[EMAIL PROTECTED]>
Date: Thu, Apr 3, 2008 at 8:35 AM
Subject: Re: [Libmesh-users] Fwd: Problems with
write_serialized_blocked_dof_objects() and subactive elements
To: Lorenzo Botti <[EMAIL PROTECTED]>
On Thu, Apr 3, 2008 at 7:49 AM, Lorenzo Botti <[EMAIL PROTECTED]> wrote:
> ---------- 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()).
I am not sure what the exact problem is (it sounds like you may have
found a bug) but I can say that in the ParallelMesh, n_nodes() returns
a cached value that may become invalidated. You might need to use
parallel_n_nodes() instead.
> 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?
We know you have not done any coarsening, but have you done any
refinement in this Mesh? How was the Mesh initially created? It
would be helpful if you could provide a short sample code that
demonstrates the problem(s).
-J
>
> 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
>
-------------------------------------------------------------------------
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