From 6dee2616f5e24850f11c81d32ecef2cb9ace6824 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 23 Dec 2011 12:29:04 +0000 Subject: [PATCH] added help info how to use the executable --- code/DAMASK_spectral_interface.f90 | 41 ++++++++++++++++++++++++++++++ code/IO.f90 | 2 -- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/code/DAMASK_spectral_interface.f90 b/code/DAMASK_spectral_interface.f90 index 2ab0a6d99..c21e65470 100644 --- a/code/DAMASK_spectral_interface.f90 +++ b/code/DAMASK_spectral_interface.f90 @@ -46,6 +46,47 @@ subroutine DAMASK_interface_init() do i=1,len(commandLine) ! remove capitals if(640) then ! if '--help' is found, use that (contains '-g') + start = index(commandLine,'--geom',.true.) + 7_pInt + endif + if(start/=3_pInt) then + print '(a)', '#############################################################' + print '(a)', 'DAMASK spectral:' + print '(a)', 'The spectral method boundary value problem solver for' + print '(a)', 'the Duesseldorf Advanced Material Simulation Kit' + print '(a)', '#############################################################' + print '(a)', 'Valid command line switches:' + print '(a)', ' --geom (-g, --geometry)' + print '(a)', ' --load (-l, --loadcase)' + print '(a)', ' --restart (-r)' + print '(a)', ' --help (-h)' + print '(a)', ' ' + print '(a)', 'Mandatory Arguments:' + print '(a)', ' --load PathToLoadFile/NameOfLoadFile.load' + print '(a)', ' "PathToGeomFile" will be the working directory.' + print '(a)', ' Make sure the file "material.config" exists in the working' + print '(a)', ' directory' + print '(a)', ' For further configuration place "numerics.config"' + print '(a)', ' and "numerics.config" in that directory.' + print '(a)', ' ' + print '(a)', ' --geom PathToGeomFile/NameOfGeom.geom' + print '(a)', ' ' + print '(a)', 'Optional Argument:' + print '(a)', ' --restart XX' + print '(a)', ' Restarts at total step No. XX and overwrites existing' + print '(a)', ' results file "NameOfGeom_NameOfLoadFile_spectral.out".' + print '(a)', ' Works only if the restart information for total step No. XX' + print '(a)', ' is available.' + print '(a)', 'Help:' + print '(a)', ' --help' + print '(a)', ' Prints this message and exits' + print '(a)', ' ' + stop + endif + if (.not.(command_argument_count()==4 .or. command_argument_count()==6)) & ! check for correct number of given arguments (no --help) + stop 'Wrong Nr. of Arguments. Run DAMASK_spectral.exe --help' ! Could not find valid keyword (position 0 +3). Functions from IO.f90 are not available start = index(commandLine,'-g',.true.) + 3_pInt ! search for '-g' and jump to first char of geometry if (index(commandLine,'--geom',.true.)>0) then ! if '--geom' is found, use that (contains '-g') start = index(commandLine,'--geom',.true.) + 7_pInt diff --git a/code/IO.f90 b/code/IO.f90 index 07ac4eb63..c3fb1fe4c 100644 --- a/code/IO.f90 +++ b/code/IO.f90 @@ -1172,8 +1172,6 @@ endfunction msg = 'opening material configuration' case (101) msg = 'opening input file' - case (102) - msg = 'DAMASK_spectral has wrong number of arguments' case (103) msg = 'odd resolution given' case (104)