major update for tin.h

This commit is contained in:
2021-09-16 17:09:53 +08:00
parent 760db80652
commit f5e1e808e1
4 changed files with 2541 additions and 72 deletions

View File

@@ -15,9 +15,19 @@ int main(int argc, char const *argv[])
}
infile.close();
std::vector<double> err_records;
std::vector<vertex2dc*> tin_vert;
std::vector<triangle*> tin_ele;
dem2tin(topo, 0, 1000, 0, 1000, 10, 10, tin_vert, tin_ele, 1.0);
dem2tin(topo, 0, 1000, 0, 1000, 10, 10, tin_vert, tin_ele, 1.0, &err_records);
// Write a log file
std::ofstream logfile("topo_TIN.log");
logfile << "# Insertion Maxi-Error\n";
for (int i = 0; i < err_records.size(); ++i)
{
logfile << i+1 << " " << err_records[i] << std::endl;
}
logfile.close();
// Write a Gmsh's .msh file
std::ofstream outfile("topo_TIN.msh");