Introduction
Introduction Statistics Contact Development Disclaimer Help
tadd outline to plot kinetic energy over time - slidergrid - grid of elastic sl…
git clone git://src.adamsgaard.dk/slidergrid
Log
Files
Refs
README
LICENSE
---
commit 64ff0d3cc5fff3d9f05502d7db911e75ebc1731d
parent 18aacc6e97a8d8b41b307dbd97051738a3218759
Author: Anders Damsgaard <[email protected]>
Date: Wed, 30 Mar 2016 13:51:39 -0700
add outline to plot kinetic energy over time
Diffstat:
M postprocessing.py | 23 +++++++++++++++++------
M tests/elasticity/Makefile | 2 +-
2 files changed, 18 insertions(+), 7 deletions(-)
---
diff --git a/postprocessing.py b/postprocessing.py
t@@ -13,9 +13,10 @@ def print_usage():
print('usage: ' + SCRIPTNAME + ' [OPTIONS] <FOLDER1> [FOLDER2, ...]')
print('where FOLDER is an output folder placed in this directory')
print('options:')
- print(' -h, --help show this information')
- print(' -v, --version show version information')
- print(' -ps, --plot-sliders plot slider positions')
+ print(' -h, --help show this information')
+ print(' -v, --version show version information')
+ print(' -ps, --plot-sliders plot slider positions')
+ print(' -pk, --plot-kinetic-energy plot slider positions')
def print_version():
t@@ -49,8 +50,12 @@ class sgvis:
self.read_sliders(filename)
self.plot_sliders()
+ def plot_kinetic_energy(self):
+ pass
-def iterate_over_folders(folders, plot_sliders):
+def iterate_over_folders_and_files(folders,
+ plot_sliders,
+ plot_kinetic_energy):
if len(folders) < 1:
print_usage()
sys.exit(1)
t@@ -60,6 +65,8 @@ def iterate_over_folders(folders, plot_sliders):
if plot_sliders:
vis.plot_all_sliders()
+ elif plot_kinetic_energy:
+ vis.plot_kinetic_energy()
else:
print('No actions specified. Bye.')
t@@ -67,6 +74,7 @@ def iterate_over_folders(folders, plot_sliders):
def main(argv):
folders = []
plot_sliders = False
+ plot_kinetic_energy = False
try:
opts, args = getopt.getopt(argv, 'hvs',
['help', 'version', 'plot-sliders'])
t@@ -84,13 +92,16 @@ def main(argv):
print_version()
sys.exit(0)
- elif opt in ('-s', '--plot-sliders'):
+ elif opt in ('-ps', '--plot-sliders'):
plot_sliders = True
+ elif opt in ('-pk', '--plot-kinetic-energy'):
+ plot_kinetic_energy = True
+
for arg in args:
folders.append(arg)
- iterate_over_folders(folders, plot_sliders)
+ iterate_over_folders_and_files(folders, plot_sliders, plot_kinetic_energy)
if __name__ == '__main__':
main(sys.argv[1:])
diff --git a/tests/elasticity/Makefile b/tests/elasticity/Makefile
t@@ -8,7 +8,7 @@ ESSENTIALOBJS=$(SRCFOLDER)/main.o \
$(SRCFOLDER)/grid.o \
$(SRCFOLDER)/vector_math.o \
$(SRCFOLDER)/simulation.o
-BIN=twograins
+BIN=normal
default: run-test
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.