## You are here

# Free Finite Element Programs in Fortran 95

Programs from Programming the Finite Element Method by Ian M. Smith and D. V. Griffiths are downloadable from: www.mines.edu/~vgriffit/4th_ed/Software This title demonstrates how to develop computer programmes which solve specific engineering problems using the finite element method. It enables students, scientists and engineers to assemble their own computer programmes to produce numerical results to solve these problems. The first three editions of Programming the Finite Element Method established themselves as an authority in this area. This fully revised 4th edition includes completely rewritten programmes with a unique description and list of parallel versions of programmes in Fortran 90. The Fortran programmes and subroutines described in the text will be made available on the Internet via anonymous ftp, further adding to the value of this title. From the Back Cover Following the highly successful previous editions, this 4th edition contains programs and subroutine libraries fully updated to Fortran95, which are freely available on the Internet. A wide variety of problem solving capabilities are presented including structural analysis, elasticity and plasticity, construction processes in geomechanics, uncoupled and coupled steady and transient fluid flow and linear and nonlinear solid dynamics. A major new feature is the inclusion of parallelised programs, using MPI, which enable parallel processing of all types of finite element analyses. Performance evaluation shows that these programs make efficient use of parallel hardwares ranging from supercomputers to clusters of PCs. Key features include: A clear outline of modular programming philosophy. More than 60 programs covering a wide range of problems in engineering and science. Results display using PostScript files. Exercises for students to solve. A simple but powerful parallelisation strategy. These improvements all contribute to a more comprehensive book with a wide appeal. It will be of particular interest to students and practitioners in the application of finite element methods; to undergraduates and postgraduates in civil, mechanical and aeronautical engineering (stress analysis and fluid flow problems); to applied mathematicians and physicists (solution of partial differential equations); and to engineers in all of the above fields.

- Jinsong Huang's blog
- Log in or register to post comments
- 29078 reads

## Comments

## Comments and Questions

Any comments are welcome. We can answer your questions here.

## Programming the Finite Element Method

Just a note about the Fortran source files

I tried compiling the 4th edition source files with gfortran version 5.1.0 and got a SIGSEGV error.

I then compiled them with gfortran version 4.8.1 and there was no problem.

## Tiantangyu@hhu.edu.cn Dept.

Tiantangyu@hhu.edu.cn

Dept. of Engineering Mechanics

Hohai Univ.

China

## mark Shengxu Xia

mark

Shengxu Xia

## Programming with fortran

Hi,

Thanks for inroducing suck a great book.

I was wondering how I can get the 3rd or 4th edition of this book in PDF or other formats.

Thanks

## Finite Element Programs in Fortran

Hello

I'm trying to remove some rows and columns which have zero elements. Actually, i'm employing the boundary conditions to a matrix.

I wrote the following code and it works well. but, ineed to make it as a subroutine. To this end, i change a bit the following code. but, it doesn't work. I'm not sure it is possible to make a subroutine. Whould you mind helping me. I already appreciate.

program main

real ,allocatable :: matrix(:,:)

real, allocatable :: NNN(:,:),NNN_abated(:,:),NNN_final(:,:) ! the array

integer i,j,count1,count2,nzero

allocate(matrix(3,5))

allocate (NNN(3,5))

matrix(1,:)=(/5,0,24,63,0/)

matrix(2,:)=(/0,0,0,0,0/)

matrix(3,:)=(/1,0,7,32,0/)

count1=0 ! count1 is corresponding to the number of non-zero rows of any matrix

do i=1,3 ! i is for reckoning the rows, 3 is the maximum value of the rows

nzero=0 ! number of zeros in a row or column

do j=1,5 ! j is for reckoning the columns, 5 is the maximum value of the columns

if (matrix(i,j)==(0))then ! calculation of the number of zeros in a row of the matrix

nzero=nzero+1

endif

enddo

if ((nzero).ne.(5)) then !investigating whether all of the elements of the row is zero or not

count1=count1+1 !number of non-zero rows

NNN(count1,:)=matrix(i,:) !transmission of the non-zero rows to the top rows

endif

enddo

allocate (NNN_abated(count1,5)) ! removing the zero rows by employing another matrix

count2=0 ! count2 is corresponding to the number of non-zero columns of any matrix

do j=1,5

nzero=0

do i=1,3

if (NNN(i,j)==(0,0))then

nzero=nzero+1

endif

enddo

if ((nzero).ne.(3)) then

count2=count2+1 !number of non-zero columns

NNN_abated(:,count2)=NNN(:,j) !transmission of the non-zero columns to the left columns

endif

enddo

allocate (NNN_final(count1,count2)) ! in this matrix all the zero rows and columns are eliminated

do i=1,count1

do j=1,count2

NNN_final(i,j)=NNN_abated(i,j)

enddo

enddo

print*,count1,count2

end

## hi b196042

It will be easier to track your problem if you can post your subroutine.

## bandwidth

Hi,

I cannot understand the how the bandwidth can be obtained by the following code:

idof=SIZE(g)

!idof=6

DO i=1,idof

iwp1=1

IF(g(i)/=0)THEN !non-zero freedom

DO j=1,idof

IF(g(j)/=0)THEN

im=g(i)-g(j)+1

IF(im>iwp1)iwp1=im

END IF

END DO !after this loop, iwp1 gets its largest value for g(i)

k=g(i)

IF(iwp1>kdiag(k))kdiag(k)=iwp1

!kdiag=0 by default

END IF

END DO

RETURN

!-----------------------

Thank you!

## This is the free form

This is the free form version of Fortran, no statement numbers, no C in column 1, start in column 1 (not column 7), typically indent 2, 3, or 4 spaces per each structure. WordPress development company in India