Program structure. next up previous contents
Next: Allocation of the fields Up: CalculiX CrunchiX USER'S MANUAL Previous: User-defined output   Contents

Program structure.

CalculiX CrunchiX is a mixture of FORTRAN77 (with elements from FORTRAN90) and C. C is primarily used for automatic allocation and reallocation purposes. FORTRAN is the first language I learned and I must admit that I'm still a FORTRAN addict. I use C where necessary, I avoid it where possible. Another option would have been to code everything in FORTRAN90, however, to this date there is no good FREE FORTRAN90 compiler. Roughly speaking, the main routine and some of the routines called by main are in C, the others are in FORTRAN. This means that no C routine is called by a FORTRAN routine, a FORTRAN routine may be called by a C routine or a FORTRAN routine. There are NO commons in the code. All data transfer is through arguments of subroutine calls. All arguments are transferred by address, not value (there may be one or two exceptions on this rule in the code).

The main subroutine of CalculiX is ccx_2.5.c. It consists roughly of the following parts:

For each step:
  1. Reading the step input data (including the prestep data for the first step)
  2. Determining the matrix structure
  3. Filling and solving the set of equations, storing the results.



Subsections
next up previous contents
Next: Allocation of the fields Up: CalculiX CrunchiX USER'S MANUAL Previous: User-defined output   Contents
guido dhondt 2012-10-06