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

• the blanks are deleted
• all characters are changed to uppercase except file names
• the comment lines are not stored
• the include statements are expanded

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:

2. *NODE
3. *USER ELEMENT
4. *ELEMENT
5. *NSET
6. *ELSET
7. *TRANSFORM
8. *MATERIAL
9. *DISTRIBUTION
10. *ORIENTATION
11. *SURFACE
12. *TIE
13. *SURFACE INTERACTION
14. *INITIAL CONDITIONS
15. *AMPLITUDE
16. *CONTACTPAIR
17. *COUPLING
18. 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=18. 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 155

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

• update nentries in the parameter statement in the FORTRAN subroutines allocation.f, calinput.f, keystart.f, getnewline.f and writeinput.f
• update the initialization of nentries in the C-routines ccx_2.19.c, readinput.c and readnewmesh.c.
• update the data statement for the field nameref in the FORTRAN subroutines keystart.f and writeinput.f
• update the data statement for the field namelen in the FORTRAN subroutine keystart.f. It contains the number of characters in each keyword.
• look for the block running

      else if(strcmp1(&buff[0],"*ORIENTATION")==0){
FORTRAN(keystart,(&ifreeinp,ipoinp,inp,"ORIENTATION",
nline,&ikey));
}
\item insert the new keyword in the comment list at the beginning of
subroutine keystart.f
\item update this section of the documentation, i.e. insert the new
keyword in the list above and change the value for nentries;


in file readinput.c, copy the block and replace ORIENTATION by the new keyword.