Hi, Folks --
I noticed that adding multiple boundary IDs to the boundary_info object
caused an assertion to fail in xdr_io::write_serialized_bcs() at line
740 of xdr_io.C, which asserts that n_bcs == n_bcs_out.
Looking at the code that packs up the IDs, it appears that only the
first boundary ID associated with each side was being stored. Is this
intentional? It looks like boundary_info is intended to be able to
store multiple boundary condition IDs per side.
Attached is a patch that packs up all of the IDs associated with each
side. The code to read in the serialized data does not appear to
require any changes.
-- Boyce
Index: src/mesh/xdr_io.C
===================================================================
--- src/mesh/xdr_io.C (revision 4085)
+++ src/mesh/xdr_io.C (working copy)
@@ -700,14 +700,17 @@
for (unsigned int s=0; s<elem->n_sides(); s++)
if (elem->neighbor(s) == NULL)
{
- const short int bc_id =
- boundary_info.boundary_id (elem, s);
-
- if (bc_id != BoundaryInfo::invalid_id)
+ const std::vector<short int>& bc_ids =
+ boundary_info.boundary_ids (elem, s);
+ for (std::vector<short int>::const_iterator id_it=bc_ids.begin();
id_it!=bc_ids.end(); ++id_it)
{
- xfer_bcs.push_back (n_local_level_0_elem);
- xfer_bcs.push_back (s) ;
- xfer_bcs.push_back (bc_id);
+ const short int bc_id = *id_it;
+ if (bc_id != BoundaryInfo::invalid_id)
+ {
+ xfer_bcs.push_back (n_local_level_0_elem);
+ xfer_bcs.push_back (s) ;
+ xfer_bcs.push_back (bc_id);
+ }
}
}
}
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel