summaryrefslogtreecommitdiff
path: root/xmds2/realistic_Rb_and_fields
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2012-11-28 23:37:56 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2012-11-28 23:37:56 -0500
commitdd093133de2a1328dcdaaf03765b5d15835ed0f9 (patch)
tree1da7d40a66b53d7f2b50d95ecf95c1ca4149c8c2 /xmds2/realistic_Rb_and_fields
parentaeeeb3a41ba3df163dede45c37efe74c6ce71ca3 (diff)
downloadNresonances-dd093133de2a1328dcdaaf03765b5d15835ed0f9.tar.gz
Nresonances-dd093133de2a1328dcdaaf03765b5d15835ed0f9.zip
added auxiliary makefiles
Diffstat (limited to 'xmds2/realistic_Rb_and_fields')
-rw-r--r--xmds2/realistic_Rb_and_fields/Makefile.fig39
-rw-r--r--xmds2/realistic_Rb_and_fields/Makefile.par41
-rw-r--r--xmds2/realistic_Rb_and_fields/Makefile.pp47
3 files changed, 127 insertions, 0 deletions
diff --git a/xmds2/realistic_Rb_and_fields/Makefile.fig b/xmds2/realistic_Rb_and_fields/Makefile.fig
new file mode 100644
index 0000000..71fba31
--- /dev/null
+++ b/xmds2/realistic_Rb_and_fields/Makefile.fig
@@ -0,0 +1,39 @@
+### -*- make -*-
+### This makefile can be used to build and run the XMDS examples
+
+GNUPLOT_FILES = $(wildcard *.gp)
+
+SCRIPTS_DIR = .
+
+
+eps_targets = $(wildcard *.eps)
+eps_bb_targets = $(eps_targets:%.eps=%.bb)
+pdf_targets = $(eps_targets:%.eps=%.pdf)
+png_targets = $(pdf_targets:%.pdf=%.png)
+
+fig: png
+
+pdf: $(pdf_targets)
+
+# fix bounding box
+$(eps_bb_targets): %.bb : %.eps
+ @cat $< | ps2eps -q -B > $@
+
+$(pdf_targets): %.pdf : %.bb
+ epspdf $< $@
+
+png: $(png_targets)
+
+$(png_targets): %.png : %.pdf
+ convert -density 300 $< $@
+
+clean:
+ rm -f *.pdf
+ rm -f *.eps
+ rm -f *.bb
+
+real_clean: clean
+ rm -f *.png
+
+.PRECIOUS: %.run %.xsil %.m
+.PHONY: all clean
diff --git a/xmds2/realistic_Rb_and_fields/Makefile.par b/xmds2/realistic_Rb_and_fields/Makefile.par
new file mode 100644
index 0000000..5fddce1
--- /dev/null
+++ b/xmds2/realistic_Rb_and_fields/Makefile.par
@@ -0,0 +1,41 @@
+### -*- make -*-
+### This file is part of the Debian xmds package
+### Copyright (C) 2006 Rafael Laboissiere
+### This file is relased under the GNU General Public License
+### NO WARRANTIES!
+
+### This makefile can be used to build and run the XMDS examples
+
+
+XMDS_FILES = $(wildcard *.xmds)
+BASE_NAME = $(patsubst %.xmds,%,$(XMDS_FILES))
+RUN_FILES = $(patsubst %.xmds,%.run,$(XMDS_FILES))
+XSIL_FILES = $(patsubst %.xmds,%.xsil,$(XMDS_FILES))
+PARAMS_FILES = $(wildcard *.params)
+PP_DIR = $(PARAMS_FILES:%.params=%)
+CALC_XSIL_FILES = $(PARAMS_FILES:%.params=%/$(BASE_NAME).xsil)
+
+default: $(CALC_XSIL_FILES)
+
+$(CALC_XSIL_FILES): %/$(BASE_NAME).xsil : % %.params
+ echo processing $$(dirname $(@)) dir
+ $(MAKE) -C $$(dirname $(@)) \
+ -f ../Makefile.pp \
+ SCRIPTS_DIR=../ \
+ PARAMS_FILE=../$<.params \
+ XSIL_FILES=$(XSIL_FILES) \
+ RUN_FILES=$(RUN_FILES)
+
+$(PP_DIR): % : %.params
+ echo need to make dir
+ [ -d $@ ] || mkdir -p $@
+
+clean:
+ for d in $(PP_DIR); \
+ do $(MAKE) -C $$d SCRIPTS_DIR=../ -f ../Makefile.pp $@; done
+
+real_clean:
+ for d in $(PP_DIR); \
+ do $(MAKE) -C $$d SCRIPTS_DIR=../ -f ../Makefile.pp $@; done
+
+.PHONY: all clean
diff --git a/xmds2/realistic_Rb_and_fields/Makefile.pp b/xmds2/realistic_Rb_and_fields/Makefile.pp
new file mode 100644
index 0000000..e24107e
--- /dev/null
+++ b/xmds2/realistic_Rb_and_fields/Makefile.pp
@@ -0,0 +1,47 @@
+### -*- make -*-
+### This makefile can be used to build and run the XMDS examples
+
+
+GNUPLOT_FILES = $(wildcard *.gp)
+XSIL_FILES = $(wildcard *.xsil)
+RUN_FILES = $(patsubst %.xsil,%.run,$(XSIL_FILES))
+M_FILES = $(patsubst %.xsil,%.m,$(XSIL_FILES))
+
+SCRIPTS_DIR = ..
+
+XSIL2GRAPHICS = xsil2graphics
+
+include $(PARAMS_FILE)
+
+all: $(XSIL_FILES) $(M_FILES) plot fig
+
+$(XSIL_FILES): ../$(RUN_FILES) $(PARAMS_FILE)
+ $< $(PARAMS) | grep "Time elapsed for simulation is:" > exact_analysis_execution_time.txt
+
+%.m: %.xsil
+ $(XSIL2GRAPHICS) $<
+
+fig: pp_I2.stamp
+ $(MAKE) -f $(SCRIPTS_DIR)/Makefile.fig $@
+
+
+pretty_plots: pp_I2.stamp $(GNUPLOT_FILES)
+ gnuplot $(SCRIPTS_DIR)/plot_fields_propagation_I2.gp
+ gnuplot $(SCRIPTS_DIR)/plot_fields_propagation_I4.gp
+
+plot: pp_I2.stamp
+
+pp_I2.stamp: $(XSIL_FILES) $(M_FILES)
+ octave -q $(SCRIPTS_DIR)/pp_I2.m
+
+clean:
+ rm -f pp_I2.stamp
+ $(MAKE) -f $(SCRIPTS_DIR)/Makefile.fig $@
+
+real_clean: clean
+ rm -f $(M_FILES) $(XSIL_FILES) *.dat octave-core
+ $(MAKE) -f $(SCRIPTS_DIR)/Makefile.fig $@
+ rm -f exact_analysis_execution_time.txt
+
+.PRECIOUS: %.run %.xsil %.m
+.PHONY: all clean