This commit is contained in:
2026-03-31 10:26:51 -04:00
parent ca083dd384
commit 126d308543
51 changed files with 4545 additions and 0 deletions

40
lab3/print_grid2D.cpp Normal file
View File

@@ -0,0 +1,40 @@
// Read and print a file with format GRID2D_POINTS3D.
// Mainly for testing.
#include <iostream>
#include <string>
#include "grid2DPoints3D.h"
#include "grid2DIO.h"
// ********************* Functions ************************************
void UsageMsg(const std::string& command_name) {
std::cerr << "Usage: " << command_name << " {filename}\n";
}
// ********************* Main *****************************************
int main(int argc, char* argv[]) {
if (argc == 1) {
UsageMsg(argv[0]);
return 0;
}
GRID2D_POINTS3D grid2D;
try {
OpenReadGrid2DPoints3D(argv[1], grid2D);
}
catch (const std::exception&) {
std::cerr << "Exiting...\n";
return -1;
}
grid2D.FormattedPrint();
return 0;
}