Debian Codegraph @

packages/seacas/applications/txtexo/rwpval1.f

raw
1 C Copyright(C) 1999-2020 National Technology & Engineering Solutions
2 C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 C NTESS, the U.S. Government retains certain rights in this software.
4 C
5 C See packages/seacas/LICENSE for details
6
7 C************************************************************************
8 subroutine rwpval1(ntxt, ndb, flag, nump, nval, id, names,
9 & values, *)
10 C************************************************************************
11 C This subroutine with read properties from an input text file and
12 C write properties to an output exodusII file
13 C ntxt - IN - file id to read from
14 C ndb - IN - file id to write to
15 C flag - IN - flag indicating what type of properties to read/write
16 C nump - IN - number of properties
17 C nval - IN - number of values
18 C names - IN - names of the properties
19 C values - IN - values of the properties
20
21 include 'exodusII.inc'
22
23 integer ntxt, ndb, flag, nump, nval
24 integer id(*)
25 character*(mxstln) names(*)
26 integer values(*)
27
28 if (nump .eq. 0) return
29
30 do 100 i = 1, nump
31 C ... Skip comment line
32 read (ntxt, *, end=130, err=130)
33 read (ntxt, '(A)', end=120, err=120) names(i)
34 C ... Skip comment line
35 read (ntxt, *, end=130, err=130)
36 read (ntxt, *, end=130, err=130) (values(j), j = 1, nval)
37
38 C ... Write the property (unless it is 'ID')
39 if (names(i) .ne. 'ID ') then
40 do 90 j = 1, nval
41 call expp(ndb, flag, id(j), names(i), values(j), ierr)
42 90 continue
43 end if
44 100 continue
45 return
46
47 120 continue
48 130 continue
49 CALL PRTERR('FATAL', 'Problem reading property')
50 return 1
51 end