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_1.7.c. It consists roughly of the following parts:

- Allocation of the fields

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

- Allocation of the fields
  - openfile
  - readinput
  - allocate
- Reading the step input data
  - SPC's
  - Homogeneous linear equations
  - Concentrated loads
  - Facial distributed loads
  - Mechanical body loads
  - Sets
  - Material description
- Expansion of the one-dimensional and two-dimensional elements
  - Catalogueing the elements belonging to one and the same node
  - Calculating the normals in the nodes
  - Expanding the 1-D and 2-D elements
  - Connecting 1-D and 2-D elements to 3-D elements
  - Applying the SPC's to the expanded structure
  - Applying the MPC's to the expanded structure
  - Applying temperatures and temperature gradients
  - Applying concentrated forces to the expanded structure
- Contact
- Determining the matrix structure
  - Matching the SPC's
  - Decascading the MPC's
  - Renumbering the nodes to decrease the profile
  - Determining the matrix structure.
- Filling and solving the set of equations, storing the results
  - Linear static analysis
  - Nonlinear calculations
  - Frequency calculations
  - Buckling calculations
  - Modal dynamic calculations
  - Steady state dynamics calculations
- Major routines
  - mafillsm
  - results
- Aerodynamic and hydraulic networks
  - The variables and the equations
  - Determining the basic characteristics of the network
  - Initializing the unknowns
  - Calculating the residual and setting up the equation system
- List of variables and their meaning

Next: Allocation of the fields Up: CalculiX CrunchiX USER'S MANUAL Previous: User-defined output Contents