Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jukkr
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kkr
jukkr
Commits
e6f5b4a1
Commit
e6f5b4a1
authored
4 years ago
by
Philipp Rüssmann
Browse files
Options
Downloads
Patches
Plain Diff
Implement comment sign '#' for reading the inputcard
parent
ce3fe3f5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/common/ioinput.f90
+17
-4
17 additions, 4 deletions
source/common/ioinput.f90
with
17 additions
and
4 deletions
source/common/ioinput.f90
+
17
−
4
View file @
e6f5b4a1
...
...
@@ -153,7 +153,7 @@ contains
integer
,
intent
(
in
)
::
ifile
integer
,
parameter
::
maxcol
=
2048
integer
::
ierror
,
ios
,
nlinetmp
,
ncoltmp
,
iline
integer
::
ierror
,
ios
,
nlinetmp
,
ncoltmp
,
iline
,
ipos
character
(
len
=
maxcol
)
::
line
character
(
len
=
:),
allocatable
::
linetmp
...
...
@@ -195,6 +195,17 @@ contains
rewind
(
ifile
)
do
iline
=
1
,
nlines
read
(
ifile
,
fmt
=
'(A)'
)
linetmp
! now remove comments which follow the '#' sign
! to do this we overwrite linetmp starting from the '#' sign with spaces
ipos
=
index
(
linetmp
,
'#'
)
if
(
ipos
>
0
)
then
write
(
1337
,
'(A)'
)
'WARNING: Found "#" in inputcard and change line for reading'
write
(
1337
,
'(2A)'
)
'Original line:'
,
linetmp
linetmp
(
ipos
:)
=
' '
write
(
1337
,
'(2A)'
)
'Changed to:'
,
linetmp
end
if
call
capitalize_escaped_keywords
(
linetmp
,
linetxt
(
iline
),
ierror
)
if
(
ierror
==
1
)
then
write
(
1337
,
'(A,I5,A)'
)
'Warning capitalizing line '
,
iline
,
' of inputcard.'
...
...
@@ -204,16 +215,18 @@ contains
write
(
*
,
'(A,I5,A)'
)
'Error capitalizing line '
,
iline
,
' of inputcard.'
stop
end
if
end
do
end
do
! iline
!--------------------------------------------------------------------------------
! close inputcard and finish up
!--------------------------------------------------------------------------------
close
(
ifile
)
inputcard_is_read
=
.true.
end
if
end
if
! .not.inputcard_is_read
end
subroutine
end
subroutine
read_inputcard
!-------------------------------------------------------------------------------
!> Summary: Capitalize all escaped keywords in a string
...
...
This diff is collapsed.
Click to expand it.
Philipp Rüssmann
@ruess
·
4 years ago
Author
Owner
This commit fixes issue #128
This commit fixes issue #128
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment