Storing distributions for local coordinate systems

In CalculiX distributions can be used to define local coordinate systems in an elementwise fashion. The corresponding keyword is *DISTRIBUTION. Since this option is strongly related to the *ORIENTATION keyword, the latter's data structure is used to cover distributions as well.

An orientation i is described by its name in orname(i), the coordinates of its defining points a and b in orab(1..6,i) and a flag defining whether the local coordinate system is rectangular (value 1.) or cylindrical (value -1.) in orab(7,i). For each layer j of element k the entry ielorien(j,k) points to the local orientation (default: 0, i.e. no local system).

The *DISTRIBUTION cards in an input deck are always treated before any *ORIENTATION cards (independent of the order in which the user has set up his input deck; the key routine taking care of this is keystart.f). As soon as a *DISTRIBUTION card is encountered, as may orientations are created as there are lines underneath the *DISTRIBUTION card. For each of these orientations i the distribution name (let us call this distname) is stored in orname(i) and the defining points a and b in orab(1..6,i). The entry orab(7,i) takes the default zero. For each element k in which a distribution is defined (first entry in all lines underneath the *DISTRIBUTION card except the first one, which defines the default) ielorien(1,k) is set to the appropriate orientation i containing the correct distribution for this element, preceded by a minus sign, i.e. ielorien(1,k)=-i. The minus sign indicates that this orientation is optional and not yet active. It can only be activated by the correct combination of an *ORIENTATION and *SOLID SECTION card.

As soon as an *ORIENTATION card (e.g. with name ornam) is encountered using this distribution all orientations i are checked on whether their name coincides with the name of the distribution, i.e. whether orname(i)=distname. If so:

Notice that distname and ornam may be identical. The only way in which to detect that orname(i) points to an orientation and not just a distribution is by checking orab(7,i). If this is zero it is a distribution, else it is an orientation.

As soon as a *SOLID SECTION card is encountered pointing to an orientation (e.g. OR) the following steps are undertaken: