[cig-commits] commit: add --version option
Mercurial
hg at geodynamics.org
Fri Jul 26 01:56:51 PDT 2013
changeset: 207:1692d378d72f
tag: tip
user: Sylvain Barbot <sbarbot at ntu.edu.sg>
date: Thu Jul 25 11:01:14 2013 +0200
files: src/input.f90 src/relax.f90 src/types.f90
description:
add --version option
diff -r ff574e3a9184 -r 1692d378d72f src/input.f90
--- a/src/input.f90 Thu Jul 25 10:58:19 2013 +0200
+++ b/src/input.f90 Thu Jul 25 11:01:14 2013 +0200
@@ -57,7 +57,7 @@
!$ INTEGER :: omp_get_num_procs,omp_get_max_threads
REAL*8 :: dummy,dum1,dum2
REAL*8 :: minlength,minwidth
- TYPE(OPTION_S) :: opts(12)
+ TYPE(OPTION_S) :: opts(13)
INTEGER :: k,iostatus,i,e
@@ -76,11 +76,12 @@
opts( 5)=OPTION_S("no-grd-output",.FALSE.,CHAR(24))
opts( 6)=OPTION_S("no-xyz-output",.FALSE.,CHAR(25))
opts( 7)=OPTION_S("no-stress-output",.FALSE.,CHAR(26))
- opts( 8)=OPTION_S("with-stress-output",.FALSE.,CHAR(27))
- opts( 9)=OPTION_S("with-vtk-output",.FALSE.,CHAR(28))
- opts(10)=OPTION_S("with-vtk-relax-output",.FALSE.,CHAR(29))
- opts(11)=OPTION_S("dry-run",.FALSE.,CHAR(30))
- opts(12)=OPTION_S("help",.FALSE.,'h')
+ opts( 8)=OPTION_S("version",.FALSE.,CHAR(27))
+ opts( 9)=OPTION_S("with-stress-output",.FALSE.,CHAR(28))
+ opts(10)=OPTION_S("with-vtk-output",.FALSE.,CHAR(29))
+ opts(11)=OPTION_S("with-vtk-relax-output",.FALSE.,CHAR(30))
+ opts(12)=OPTION_S("dry-run",.FALSE.,CHAR(31))
+ opts(13)=OPTION_S("help",.FALSE.,'h')
DO
ch=getopt("h",opts)
@@ -106,18 +107,21 @@
! option no-xyz-output
in%isoutputxyz=.FALSE.
CASE(CHAR(26))
- ! option stress output
+ ! option no-stress-output
in%isoutputstress=.FALSE.
CASE(CHAR(27))
- ! option dry-run
+ ! option version
+ in%isversion=.TRUE.
+ CASE(CHAR(28))
+ ! option with-stress-output
in%isoutputstress=.TRUE.
- CASE(CHAR(28))
- ! option with-output-vtk
+ CASE(CHAR(29))
+ ! option with-vtk-output
in%isoutputvtk=.TRUE.
- CASE(CHAR(29))
- ! option with-output-vtk-relax
+ CASE(CHAR(30))
+ ! option with-vtk-relax-output
in%isoutputvtkrelax=.TRUE.
- CASE(CHAR(30))
+ CASE(CHAR(31))
! option dry-run
in%isdryrun=.TRUE.
CASE('h')
@@ -134,6 +138,11 @@
END SELECT
END DO
+ IF (in%isversion) THEN
+ PRINT '("relax version 1.0.5, compiled on ",a)', __DATE__
+ PRINT '("")'
+ RETURN
+ END IF
IF (in%ishelp) THEN
PRINT '("usage:")'
PRINT '("relax [-h] [--dry-run] [--help] [--no-grd-output] [--no-proj-output]")'
@@ -151,6 +160,7 @@
PRINT '(" --no-txt-output cancel output in text format")'
PRINT '(" --no-vtk-output cancel output in Paraview VTK format")'
PRINT '(" --no-xyz-output cancel output in GMT xyz format")'
+ PRINT '(" --version print version number and exit")'
PRINT '(" --with-stress-output export stress tensor")'
PRINT '(" --with-vtk-output export output in Paraview VTK format")'
PRINT '(" --with-vtk-relax-output export relaxation to VTK format")'
diff -r ff574e3a9184 -r 1692d378d72f src/relax.f90
--- a/src/relax.f90 Thu Jul 25 10:58:19 2013 +0200
+++ b/src/relax.f90 Thu Jul 25 11:01:14 2013 +0200
@@ -1,5 +1,5 @@
!-----------------------------------------------------------------------
-! Copyright 2007-2012, Sylvain Barbot
+! Copyright 2007-2013, Sylvain Barbot
!
! This file is part of RELAX
!
@@ -176,6 +176,7 @@
!! and allow scaling of computed time steps. <br>
!! (04-26-11) - include command-line arguments
!! (11-04-11) - compatible with gfortran <br>
+ !! (07-25-13) - include cylindrical and spherical ductile zones <br>
!!
!! \todo
!! - homogenize VTK output so that geometry of events match event index
@@ -187,6 +188,7 @@
!! - check the fully-relaxed afterslip for uniform stress change
!! - include topography of parameter interface
!! - export afterslip output in VTK legacy format (binary)
+ !! - export ductile zones for cylindrical and spherical geometries
!------------------------------------------------------------------------
PROGRAM relax
diff -r ff574e3a9184 -r 1692d378d72f src/types.f90
--- a/src/types.f90 Thu Jul 25 10:58:19 2013 +0200
+++ b/src/types.f90 Thu Jul 25 11:01:14 2013 +0200
@@ -199,18 +199,19 @@
TYPE(EVENT_STRUC), DIMENSION(:), ALLOCATABLE :: events
! overrides output to formats
+ LOGICAL :: isoutputgrd=.TRUE.
LOGICAL :: isoutputproj=.TRUE.
LOGICAL :: isoutputrelax=.TRUE.
+ LOGICAL :: isoutputstress=.TRUE.
LOGICAL :: isoutputtxt=.TRUE.
LOGICAL :: isoutputvtk=.TRUE.
LOGICAL :: isoutputvtkrelax=.FALSE.
- LOGICAL :: isoutputgrd=.TRUE.
LOGICAL :: isoutputxyz=.TRUE.
- LOGICAL :: isoutputstress=.TRUE.
! other options
LOGICAL :: isdryrun=.FALSE.
LOGICAL :: ishelp=.FALSE.
+ LOGICAL :: isversion=.FALSE.
END TYPE SIMULATION_STRUC
More information about the CIG-COMMITS
mailing list