Commit fa7adb65 authored by Jose Manuel Morgado Chávez's avatar Jose Manuel Morgado Chávez
Browse files

Modify RT to work with finner meshes: more than eight neighbors for a vertex

parent 578fba63
......@@ -64,7 +64,7 @@ void RadonTransform::init()
// Set elements
ifstream elem;
elem.open( "/usr/local/share/data/mesh/mesh1/elements.dat" ); // TODO: TURN TO A RELATIVE PATH.
elem.open( "/usr/local/share/data/mesh/mesh3/elements.dat" ); // TODO: TURN TO A RELATIVE PATH.
if ( elem )
{
......@@ -99,7 +99,7 @@ void RadonTransform::init()
// Set vertices
ifstream vert;
vert.open( "/usr/local/share/data/mesh/mesh1/vertices.dat" ); // TODO: CONVERT TO A RELATIVE PATH.
vert.open( "/usr/local/share/data/mesh/mesh3/vertices.dat" ); // TODO: CONVERT TO A RELATIVE PATH.
if ( vert )
{
......@@ -124,20 +124,20 @@ void RadonTransform::init()
} else
{
throw runtime_error("Missing input file 'vertices.dat'. It should be located in 'partons_root_directory/data/mesh/mesh1'");
throw runtime_error("Missing input file 'vertices.dat'. It should be located in 'partons_root_directory/data/mesh/mesh3'");
}
vert.close();
// Set vertices' neighbors.
ifstream vneighbors;
vneighbors.open( "/usr/local/share/data/mesh/mesh1/neighborsv.dat" ); // TODO: CONVERT TO A RELATIVE PATH.
vneighbors.open( "/usr/local/share/data/mesh/mesh3/neighborsv.dat" ); // TODO: CONVERT TO A RELATIVE PATH.
if ( vneighbors )
{
string linen;
int n1, n2, n3, n4, n5, n6, n7, n8, n9;
int n1, n2, n3, n4, n5, n6, n7, n8, n9, n10;
std::vector<int> vn;
......@@ -176,7 +176,17 @@ void RadonTransform::init()
if ( ss >> n8 )
{
vn.push_back(n8);
vn.push_back(n8);
if ( ss >> n9 )
{
vn.push_back(n9);
if ( ss >> n10 )
{
vn.push_back(n10);
}
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment