> Can you use "diff -c" so that it's easier for "patch" to figure out
> where to insert these new lines in case the file has changed in the
> meantime?
Here is the output of
$ diff grid_in.cc -c grid_in_new.cc> grid_in_diff-c.txt
*** grid_in.cc 2011-07-01 15:36:09.000000000 +0100
--- grid_in_new.cc 2012-05-28 22:30:16.000000000 +0100
***************
*** 856,862 ****
// do some clean-up on
// vertices...
! GridTools::delete_unused_vertices (vertices, cells, subcelldata);
// ... and cells
if(dim==spacedim)
GridReordering<dim,spacedim>::invert_all_cells_of_negative_grid
(vertices, cells);
--- 856,865 ----
// do some clean-up on
// vertices...
!
! std::vector< unsigned int > considered_vertices;
! GridTools::delete_duplicated_vertices (vertices, cells, subcelldata,
considered_vertices, 1e-10);
! // GridTools::delete_unused_vertices (vertices, cells,
subcelldata);
// ... and cells
if(dim==spacedim)
GridReordering<dim,spacedim>::invert_all_cells_of_negative_grid
(vertices, cells);
> >> There are occasions in which duplicated vertices are actually
> >> intended....
> >>
> >> Maybe you'd like to add a switch to the function on order to
> >> maintain the same behavior if this is what is intended...
>
> That's actually a good point. The domain may have a crack where vertices
> are at the same physical location but the medium is not connected. Do
> you think you can add a flag to the function like Luca suggests?
I can certainly try. Would it be something like modifying read_msh to
take an extra bool variable that if it is true would perform
GridTools::delete_duplicated and if it is false (default) would perform
GridTools::delete_unused_vertices? Does this make sense?
Regards
Javier
*** grid_in.cc 2011-07-01 15:36:09.000000000 +0100
--- grid_in_new.cc 2012-05-28 22:30:16.000000000 +0100
***************
*** 856,862 ****
// do some clean-up on
// vertices...
! GridTools::delete_unused_vertices (vertices, cells, subcelldata);
// ... and cells
if(dim==spacedim)
GridReordering<dim,spacedim>::invert_all_cells_of_negative_grid
(vertices, cells);
--- 856,865 ----
// do some clean-up on
// vertices...
!
! std::vector< unsigned int > considered_vertices;
! GridTools::delete_duplicated_vertices (vertices, cells, subcelldata,
considered_vertices, 1e-10);
! // GridTools::delete_unused_vertices (vertices, cells, subcelldata);
// ... and cells
if(dim==spacedim)
GridReordering<dim,spacedim>::invert_all_cells_of_negative_grid
(vertices, cells);
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii