CalculiX  2.13
A Free Software Three-Dimensional Structural Finite Element Program
viewfactors.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine viewfactors (textpart, iviewfile, istep, inpc, istat, n, key, iline, ipol, inl, ipoinp, inp, jobnamec, ipoinpc)
 

Function/Subroutine Documentation

◆ viewfactors()

subroutine viewfactors ( character*132, dimension(16)  textpart,
integer  iviewfile,
integer  istep,
character*1, dimension(*)  inpc,
integer  istat,
integer  n,
integer  key,
integer  iline,
integer  ipol,
integer  inl,
integer, dimension(2,*)  ipoinp,
integer, dimension(3,*)  inp,
character*132, dimension(*)  jobnamec,
integer, dimension(0:*)  ipoinpc 
)
21 !
22 ! reading the input deck: *VIEWFACTOR
23 !
24  implicit none
25 !
26  character*1 inpc(*)
27  character*132 textpart(16),jobnamec(*)
28 !
29  integer i,iviewfile,istep,n,istat,iline,ipol,inl,ipoinp(2,*),
30  & inp(3,*),key,j,k,l,ipoinpc(0:*)
31 !
32  if(istep.lt.1) then
33  write(*,*) '*ERROR reading *VIEWFACTOR: *VIEWFACTOR can '
34  write(*,*) ' only be used within a STEP'
35  call exit(201)
36  endif
37 !
38  do i=2,n
39  if(textpart(i)(1:4).eq.'READ') then
40  if(iviewfile.eq.0) then
41  iviewfile=-1
42  elseif(iviewfile.gt.0) then
43  write(*,*) '*ERROR reading *VIEWFACTOR: READ and WRITE/'
44  write(*,*) ' WRITE ONLY are mutually exclusive'
45  call inputerror(inpc,ipoinpc,iline,
46  &"*VIEWFACTOR%")
47  endif
48  elseif(textpart(i)(1:8).eq.'NOCHANGE') then
49  if(istep.eq.1) then
50  write(*,*) '*ERROR reading *VIEWFACTOR: NO CHANGE cannot'
51  write(*,*) ' be used in the first step'
52  call inputwarning(inpc,ipoinpc,iline,
53  &"*VIEWFACTOR%")
54  elseif(iviewfile.le.0) then
55  iviewfile=-2
56  elseif(iviewfile.gt.0) then
57  write(*,*) '*ERROR reading *VIEWFACTOR: NO CHANGE and'
58  write(*,*) ' WRITE/WRITE ONLY are mutually'
59  write(*,*) ' exclusive'
60  call inputerror(inpc,ipoinpc,iline,
61  &"*VIEWFACTOR%")
62  endif
63  elseif(textpart(i)(1:9).eq.'WRITEONLY') then
64  if(iviewfile.eq.0) then
65  iviewfile=3
66  elseif(iviewfile.lt.0) then
67  write(*,*) '*ERROR reading *VIEWFACTOR: '
68  write(*,*) ' WRITE ONLY and READ/NO CHANGE'
69  write(*,*) ' are mutually exclusive'
70  call inputerror(inpc,ipoinpc,iline,
71  &"*VIEWFACTOR%")
72  endif
73  elseif(textpart(i)(1:5).eq.'WRITE') then
74  if(iviewfile.eq.0) then
75  iviewfile=2
76  elseif(iviewfile.lt.0) then
77  write(*,*) '*ERROR reading *VIEWFACTOR: WRITE'
78  write(*,*) ' and READ/NO CHANGE'
79  write(*,*) ' are mutually exclusive'
80  call inputerror(inpc,ipoinpc,iline,
81  &"*VIEWFACTOR%")
82  endif
83  elseif(textpart(i)(1:6).eq.'INPUT=') then
84  jobnamec(2)(1:126)=textpart(i)(7:132)
85  jobnamec(2)(127:132)=' '
86  loop1: do j=1,126
87  if(jobnamec(2)(j:j).eq.'"') then
88  do k=j+1,126
89  if(jobnamec(2)(k:k).eq.'"') then
90  do l=k-1,126
91  jobnamec(2)(l:l)=' '
92  exit loop1
93  enddo
94  endif
95  jobnamec(2)(k-1:k-1)=jobnamec(2)(k:k)
96  enddo
97  jobnamec(2)(126:126)=' '
98  endif
99  enddo loop1
100  elseif(textpart(i)(1:7).eq.'OUTPUT=') then
101  jobnamec(3)(1:125)=textpart(i)(8:132)
102  jobnamec(3)(126:132)=' '
103  loop2: do j=1,125
104  if(jobnamec(3)(j:j).eq.'"') then
105  do k=j+1,125
106  if(jobnamec(3)(k:k).eq.'"') then
107  do l=k-1,125
108  jobnamec(3)(l:l)=' '
109  exit loop2
110  enddo
111  endif
112  jobnamec(3)(k-1:k-1)=jobnamec(3)(k:k)
113  enddo
114  jobnamec(3)(125:125)=' '
115  endif
116  enddo loop2
117  else
118  write(*,*)
119  & '*WARNING reading *VIEWFACTOR: parameter not recognized:'
120  write(*,*) ' ',
121  & textpart(i)(1:index(textpart(i),' ')-1)
122  call inputwarning(inpc,ipoinpc,iline,
123  &"*VIEWFACTOR%")
124  endif
125  enddo
126 !
127  call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
128  & ipoinp,inp,ipoinpc)
129 !
130  return
subroutine inputwarning(inpc, ipoinpc, iline, text)
Definition: inputwarning.f:20
subroutine getnewline(inpc, textpart, istat, n, key, iline, ipol, inl, ipoinp, inp, ipoinpc)
Definition: getnewline.f:21
subroutine inputerror(inpc, ipoinpc, iline, text)
Definition: inputerror.f:20
Hosted by OpenAircraft.com, (Michigan UAV, LLC)