[cig-commits] r5610 - in long/3D/Gale/trunk: . tools
walter at geodynamics.org
walter at geodynamics.org
Thu Dec 21 00:26:27 PST 2006
Author: walter
Date: 2006-12-21 00:26:27 -0800 (Thu, 21 Dec 2006)
New Revision: 5610
Removed:
long/3D/Gale/trunk/tools/viz.cxx
Modified:
long/3D/Gale/trunk/
Log:
r1256 at earth: boo | 2006-12-21 00:23:54 -0800
Remove the redundant vix.cxx program
Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
- 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:1253
+ 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:1256
Deleted: long/3D/Gale/trunk/tools/viz.cxx
===================================================================
--- long/3D/Gale/trunk/tools/viz.cxx 2006-12-21 06:50:05 UTC (rev 5609)
+++ long/3D/Gale/trunk/tools/viz.cxx 2006-12-21 08:26:27 UTC (rev 5610)
@@ -1,52 +0,0 @@
-#include <fstream>
-#include <vector>
-#include <iostream>
-
-using namespace std;
-
-int main(int argc, char *argv[])
-{
- if(argc<3)
- {
- cerr << "usage: viz step file1 file2 file3 ..." << endl;
- exit(1);
- }
- int step=atoi(argv[1]);
- for(int j=2; j<argc; ++j)
- {
- string input_name=argv[j];
- vector<double> x,y,z;
- vector<double> weakening;
- double temp;
- ifstream f(input_name.c_str());
- f >> temp;
- while(f)
- {
- double tx, ty, tz, tw;
- f >> tx >> ty >> tz >> tw;
- x.push_back(tx);
- y.push_back(ty);
- z.push_back(tz);
- weakening.push_back(tw);
- f >> temp;
- }
-
- cout << input_name << " " << x.size()/step << endl;
-
- string output_name=(input_name.substr(0,input_name.size()-3)+"vtk").c_str();
- ofstream vtk_file(output_name.c_str());
- vtk_file << "# vtk DataFile Version 2.0\nGale\nASCII\nDATASET UNSTRUCTURED_GRID\nPOINTS ";
- vtk_file << (x.size()-1)/step+1 << " float" << endl;
- for(int i=0;i<x.size();i+=step)
- vtk_file << x[i] << " " << y[i] << " " << z[i] << endl;
-
- vtk_file << "POINT_DATA " << (x.size()-1)/step+1 << endl
- << "SCALARS Temperature_Scalars float 1" << endl
- << "LOOKUP_TABLE default" << endl;
-
- for(int i=0; i<weakening.size(); i+=step)
- vtk_file << weakening[i] << " ";
- vtk_file << endl;
- }
-}
-
More information about the cig-commits
mailing list