> Is there a particular reason why Mesh::set_n_subdomains() is protected?
> 
> We just noticed that there's an output bug when writing out xda/xdr
> format meshes after reading in Exodus meshes with subdomain_id's on
> them in the form of blocks.... the subdomain_id's don't get written to
> the xda/xdr files.
> 
> The reason appears to be that n_subdomains() is still _0_ on the
> mesh.... and after looking at it... that's because the only way to set
> n_subdomains() is by using a BoundaryMesh/Info object and the sync()
> method.  But I can't see any reason why ExodusIO shouldn't be able to
> set the number of subdomains when it reads a mesh in.... so I'm voting
> for just making set_n_subdomains() public.

Definition at line 257 of file mesh_base.C.
unsigned int MeshBase::recalculate_n_partitions      ( )

In a few (very rare) cases, the user may have manually tagged the elements
with specific processor IDs by hand, without using a partitioner. In this
case, the Mesh will not know that the total number of partitions, _n_parts,
has changed, unless you call this function. This is an O(N active elements)
calculation. The return value is the number of partitions, and _n_parts is
also set by this function.

Sounds like we could use a corresponding recalculate_n_subdomains()

Or make it public.  Or both...  (I'm feeling agreeable.)

-Ben


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to