include $D/common/Make.global_options
debug-mode = off
-libraries = $(lib-deal2-1d.o) \
- $(lib-deal2-2d.o) \
- $(lib-deal2-3d.o) \
- $(lib-lac.o) \
- $(lib-base.o)
+o = g.o
+l = g
+libraries = $(lib-deal2-1d.$l) \
+ $(lib-deal2-2d.$l) \
+ $(lib-deal2-3d.$l) \
+ $(lib-lac.$l) \
+ $(lib-base.$l)
############################################################
# First how to create executables, including all necessary
# flags:
############################################################
-flags = $(CXXFLAGS.o)
+flags = $(CXXFLAGS.$l)
ifeq ($(findstring gcc,$(GXX_VERSION)),gcc)
flags += -Wno-missing-noreturn
%.o : %.cc Makefile
@echo =====optimized===== $<
@$(CXX) $(CXXFLAGS.o) -c $< -o $@
-%.exe :
+%.exe : %.o
@echo =====linking======= $@
- @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
+ @$(CXX) $(LDFLAGS) -o $@ $^
default: embedding.exe interpolation.exe
############################################################
-embedding.exe : embedding.o $(libraries)
-interpolation.exe: interpolation.o $(libraries)
+embedding.exe : embedding.$o $(libraries)
+interpolation.exe: interpolation.$o $(libraries)
+gridio.exe : gridio.$o $(libraries)
############################################################
# Automatic generation of dependencies
--- /dev/null
+// $Id$
+// (c) Guido Kanschat
+
+// A little program reading a grid *.inp and writing it to *.eps.
+// Some more functionality should be added som time.
+
+#include <grid/tria.h>
+#include <grid/grid_in.h>
+#include <grid/grid_out.h>
+
+#include <iostream>
+#include <fstream>
+#include <string>
+
+using namespace std;
+
+int main(int argc, const char** argv)
+{
+ if (argc<2)
+ {
+ cerr << "Usage: " << argv[0] << " <filename>" << endl;
+ exit(1);
+ }
+
+ string iname =argv[1];
+// if (iname.find_last_of('.') <= 0)
+// iname.append(".inp");
+
+ Triangulation<2> tr;
+
+ ifstream in (iname.c_str());
+ AssertThrow(in, ExcFileNotOpen(argv[1]));
+
+ GridIn<2> gin;
+ gin.attach_triangulation(tr);
+ gin.read_ucd(in);
+
+ GridOut gout;
+
+ string oname(iname, 0, iname.find_last_of('.'));
+ oname.append(".eps");
+ cout << iname << " -> " << oname << endl;
+ ofstream out(oname.c_str());
+
+ gout.write_eps(tr, out);
+
+// GridOut
+}