On Wed, Aug 29, 2012 at 2:47 PM, David Knezevic
<dkneze...@seas.harvard.edu> wrote:
>
> I've attached a slightly updated version of the patch. It's working well for
> me. I can go ahead and check it in if you think it's generally useful.

Looks good to me.  Minor comments below...


+  void stitch_meshes (SerialMesh& other_mesh,
+                      boundary_id_type
this_mesh_boundary=BoundaryInfo::invalid_id,
+                      boundary_id_type
other_mesh_boundary=BoundaryInfo::invalid_id,
+                      Real tol=TOLERANCE,
+                      bool clear_stitched_boundary_ids=false);

So, by default, the function generates disjoint grids?

I guess I'd prefer the default to be that the user explicitly has to
pass BoundaryInfo::invalid_id if he wants to skip the node matching
procedure.

The idea being that this function would primarily be used with the
intent of producing a single, conforming grid with no overlapping
nodes; while some smaller percentage of power users would use it to
create overlapping domains and subsequently handle that in some
application-dependent way.

So we should make the function harder to accidentally call the wrong
way in the majority of use cases...




+        Real x_diff = this_node(0) - other_node(0);
+        Real y_diff = this_node(1) - other_node(1);
+        Real z_diff = this_node(2) - other_node(2);
+        Real node_distance = std::sqrt(x_diff*x_diff + y_diff*y_diff
+ z_diff*z_diff);

Could be replaced by:

Real node_distance = (this_node - other_node).size()




+    libMesh::out << "In SerialMesh::stitch_meshes:" << std::endl
+                 << "This mesh has " << this_boundary_node_ids.size()
<< " nodes on specified boundary" << std::endl
+                 << "Other mesh has " <<
other_boundary_node_ids.size() << " nodes on specified boundary" <<
std::endl
+                 << "Found " << node_to_node_map.size() << " matching
nodes." << std::endl << std::endl;

Maybe only print in debug mode?  Or we could pass a verbosity flag...






-- 
John

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to