next up previous contents
Next: allocate Up: Allocation of the fields Previous: openfile   Contents

readinput

This subroutine reads the input and stores it in field inpc. Before storing, the following actions are performed:

Furthermore, the number of sets are counted and stored in nset_, the number of lines in inpc are stored in nline. The variable nset_ is used for subsequent allocation purposes. Finally, the order in which inpc is to be read is stored in the fields ipoinp and inp. Indeed, some keyword cards cannot be interpreted before others were read, e.g. a material reference in a *SOLID SECTION card cannot be interpreted before the material definition in the *MATERIAl card was read. The order in which keyword cards must be read is defined in field nameref in subroutine keystart.f. Right now, it reads:

  1. *RESTART,READ
  2. *NODE
  3. *ELEMENT
  4. *NSET
  5. *ELSET
  6. *TRANSFORM
  7. *MATERIAL
  8. *ORIENTATION
  9. *SURFACE
  10. *TIE
  11. *SURFACE INTERACTION
  12. *INITIAL CONDITIONS
  13. *AMPLITUDE
  14. *CONTACTPAIR
  15. everything else

This means that *RESTART,READ has to be read before all other cards, then comes *NODE etc. The way inpc is to be read is stored in the fields ipoinp, inp and ipoinpc. The two-dimensional field ipoinp consists of 2 columns and nentries rows, where nentries is the number of keyword cards listed in the list above, i.e. right now nentries=15. The first column of row i in field ipoinp contains a row number of field inp, for instance j1. Then, the first column of row j1 in field inp contains the line number where reading for keyword i should start, the second column contains the line number where reading should end and the third column contains the line number in field inp where the reading information for keyword i continues, else it is zero. If it is zero the corresponding row number in inp is stored in the second column of row i in field ipoinp. Lines are stored consecutively in field inpc (without blanks and without comment lines). Line l1 starts at ipoinpc(l1-1)+1 (first character) and ends at ipoinpc(l1) (last character). Notice that ipoinpc(0)=0. This structure uniquely specifies in what order field inpc must be read. This is also illustrated in Figure 134

Figure 134: Reading the lines for keyword entry i
\begin{figure}\epsfig{file=input.eps,width=10cm}\end{figure}

If you want to add keywords in the above list you have to


next up previous contents
Next: allocate Up: Allocation of the fields Previous: openfile   Contents
guido dhondt 2014-03-02