Please go to SLFFEA HOME, which
has a complete FEA package I developed and released under the GNU
license. This page is no longer relevant.

This page used to be the source code page for my simple truss program,
but now I use it so you can see an example of the code I have written.

This is the
Makefile : It links the individual modules
together.

There are 10 program modules:

femtruss.c : This is the main program. It does
the memory allocation, variable definition, user request, and
function calling.

tsreader.c
This program reads in the data for
the problem.

tsidlm.c
This program assembles the id
and lm arrays. The id array assigns the degrees of freedom per
node. The lm array assigns degrees of freedom per element.

dotx.c
This program takes the dot product of 2 vectors.

tsidiag.c
This program assembles the
idiag array. This array is used for keeping track of the column
heights of a global stiffness matrix stored in skyline form.

tskasmbl.c
This program assembles
the stiffness matrix in skyline form. It also will be called
after the analysis is completed for calculation of the reaction
forces.

matx.c
This program does matrix
multiplication.

matxt.c
This program does matrix
multiplication after transposing the first matrix.

sky.c
This program performs LU
decomposition on a skylined matrix. It also has a subroutine
to solve the skylined system.

tswriter.c
This program writes out the data to a file *.ots
after analysis is complete.

There are 2 include files:

tsconst.h
This is the include file
that defines all the constants of the program.

tsstruct.h
This is the include file
which defines all the structures used for the program.

This is an example of a truss input file:
ts3_6.txt
This file is taken from example 3.6 on page 77 in the book, A
First Course in the Finite Element Method 2nd Ed. by
Daryl L. Logan, published in 1992 by PWSKENT.
