Skip to content

Commit

Permalink
Changes in tetgen_io.C for -Wshadow.
Browse files Browse the repository at this point in the history
Issue #24.
  • Loading branch information
John Peterson committed Jan 31, 2013
1 parent f0b0f45 commit afe6891
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/mesh/tetgen_io.C
Expand Up @@ -281,10 +281,10 @@ void TetGenIO::write (const std::string& fname)
}

// Open the output file stream
std::ofstream out (fname.c_str());
std::ofstream out_stream (fname.c_str());

// Make sure it opened correctly
if (!out.good())
if (!out_stream.good())
libmesh_file_error(fname.c_str());

// Get a reference to the mesh
Expand All @@ -293,20 +293,20 @@ void TetGenIO::write (const std::string& fname)
// Begin interfacing with the .poly file
{
// header:
out << "# poly file output generated by libmesh\n"
out_stream << "# poly file output generated by libmesh\n"
<< mesh.n_nodes() << " 3 0 0\n";

// write the nodes:
for (dof_id_type v=0; v<mesh.n_nodes(); v++)
out << v << " "
out_stream << v << " "
<< mesh.point(v)(0) << " "
<< mesh.point(v)(1) << " "
<< mesh.point(v)(2) << "\n";
}

{
// write the connectivity:
out << "# Facets:\n"
out_stream << "# Facets:\n"
<< mesh.n_elem() << " 0\n";

// const_active_elem_iterator it (mesh.elements_begin());
Expand All @@ -316,16 +316,16 @@ void TetGenIO::write (const std::string& fname)
const MeshBase::const_element_iterator end = mesh.active_elements_end();

for ( ; it != end; ++it)
out << "1\n3 " // no. of facet polygons
out_stream << "1\n3 " // no. of facet polygons
// << (*it)->n_nodes() << " "
<< (*it)->node(0) << " "
<< (*it)->node(1) << " "
<< (*it)->node(2) << "\n";
}

// end of the file
out << "0\n"; // no holes output!
out << "\n\n# end of file\n";
out_stream << "0\n"; // no holes output!
out_stream << "\n\n# end of file\n";
}

} // namespace libMesh
Expand Down

0 comments on commit afe6891

Please sign in to comment.