897
902
903 class(BndExtType) :: this
904
905 character(len=10) :: cpos
906 character(len=LINELENGTH) :: tag
907 character(len=LINELENGTH), allocatable, dimension(:) :: words
908 integer(I4B) :: ntabrows
909 integer(I4B) :: ntabcols
910 integer(I4B) :: ipos
911 integer(I4B) :: ii, jj, i, j, k, nod
912 integer(I4B) :: ldim
913 integer(I4B) :: naux
914 type(TableType), pointer :: inputtab => null()
915
916 character(len=LINELENGTH) :: fmtlstbn
917
918
919 ldim = this%ncolbnd
920 naux = size(this%auxvar, 1)
921
922
923 ntabrows = this%nbound
924
925
926
927 ipos = index(this%listlabel, 'NO.')
928 if (ipos /= 0) then
929 write (cpos, '(i10)') ipos + 3
930 fmtlstbn = '(a'//trim(adjustl(cpos))
931 else
932 fmtlstbn = '(a7'
933 end if
934
935 if (size(this%dis%mshape) == 3) then
936 ntabcols = 4
937 fmtlstbn = trim(fmtlstbn)//',a7,a7,a7'
938
939
940 else if (size(this%dis%mshape) == 2) then
941 ntabcols = 3
942 fmtlstbn = trim(fmtlstbn)//',a7,a7'
943
944
945 else
946 ntabcols = 2
947 fmtlstbn = trim(fmtlstbn)//',a7'
948 end if
949
950
951 ntabcols = ntabcols + ldim
952 do i = 1, ldim
953 fmtlstbn = trim(fmtlstbn)//',a16'
954 end do
955
956
957 if (this%inamedbound == 1) then
958 ntabcols = ntabcols + 1
959 fmtlstbn = trim(fmtlstbn)//',a16'
960 end if
961
962
963 ntabcols = ntabcols + naux
964 do i = 1, naux
965 fmtlstbn = trim(fmtlstbn)//',a16'
966 end do
967 fmtlstbn = trim(fmtlstbn)//')'
968
969
970 allocate (words(ntabcols))
971
972
973 read (this%listlabel, fmtlstbn) (words(i), i=1, ntabcols)
974
975
977 call inputtab%table_df(ntabrows, ntabcols, this%iout)
978
979
980 ipos = 1
981 call inputtab%initialize_column(words(ipos), 10, alignment=
tabcenter)
982
983
984 do i = 1, size(this%dis%mshape)
985 ipos = ipos + 1
986 call inputtab%initialize_column(words(ipos), 7, alignment=
tabcenter)
987 end do
988
989
990 do i = 1, ldim
991 ipos = ipos + 1
992 call inputtab%initialize_column(words(ipos), 16, alignment=
tabcenter)
993 end do
994
995
996 if (this%inamedbound == 1) then
997 ipos = ipos + 1
998 tag = 'BOUNDNAME'
1000 end if
1001
1002
1003 do i = 1, naux
1004 call inputtab%initialize_column(this%auxname(i), 16, alignment=
tabcenter)
1005 end do
1006
1007
1008 do ii = 1, this%nbound
1009 call inputtab%add_term(ii)
1010
1011
1012 if (size(this%dis%mshape) == 3) then
1013 nod = this%nodelist(ii)
1014 call get_ijk(nod, this%dis%mshape(2), this%dis%mshape(3), &
1015 this%dis%mshape(1), i, j, k)
1016 call inputtab%add_term(k)
1017 call inputtab%add_term(i)
1018 call inputtab%add_term(j)
1019 else if (size(this%dis%mshape) == 2) then
1020 nod = this%nodelist(ii)
1021 call get_ijk(nod, 1, this%dis%mshape(2), this%dis%mshape(1), i, j, k)
1022 call inputtab%add_term(k)
1023 call inputtab%add_term(j)
1024 else
1025 nod = this%nodelist(ii)
1026 call inputtab%add_term(nod)
1027 end if
1028
1029
1030 do jj = 1, ldim
1031 call inputtab%add_term(this%bound_value(jj, ii))
1032 end do
1033
1034
1035 if (this%inamedbound == 1) then
1036 call inputtab%add_term(this%boundname(ii))
1037 end if
1038
1039
1040 do jj = 1, naux
1041 call inputtab%add_term(this%auxvar(jj, ii))
1042 end do
1043 end do
1044
1045
1046 call inputtab%table_da()
1047 deallocate (inputtab)
1048 nullify (inputtab)
1049 deallocate (words)
integer(i4b), parameter linelength
maximum length of a standard line
@ tabcenter
centered table column
@ tableft
left justified table column
integer(i4b), parameter lenboundname
maximum length of a bound name
real(dp), parameter dzero
real constant zero
subroutine, public table_cr(this, name, title)