Programming Manual Feap 84 Ch1
Programming Manual Feap 84 Ch1
INTRODUCTION
In this part of the FEAP manual some of the options to extend the capabilities of
the program are described. We begin by describing the utilities provided in FEAP for
use in data input. Options to add user commands for mesh and command language
extensions is then described and finally the method to add an element to the program
is described.
The size of problems which may be solved by FEAP depends on the amount of memory
available in the computer, as well as, solution options used. Memory for the main
arrays used to solve problems is dynamically allocated during the solution. Arrays are
allocated and deallocated using a system subprogram PALLOC or, for user developed
modules using subprogram UALLOC. Further information on use of these routines is
given in Section 3.
The IPR parameter in the feap84.f module controls the specification of the ratio of
REAL to INTEGER variables. For typical UNIX and PC systems all real variables should
be twice as large as integers and IPR is set to 2. For systems in which INTEGER*8
variables are used (set by compiler option) the IPR parameter is set to 1. Any error
in setting this parameter may lead to incorrect behavior of the program, consequently,
do not reset the parameter unless a careful assessment of compiler behavior has been
made.
Normally FEAP reads each input data line as text data and checks each character for
the presence of parameters, expressions, and constants. For very large data sets this
parsing of each instruction can consume several seconds of compute time. If all data
is normally provided as numerical data, without use of any parameters or expressions,
1
CHAPTER 1. INTRODUCTION 2
the input time may be reduced by setting the value of the logical variable COFLG in
feap84.f to false. FEAP will automatically switch to parsing mode if any record
contains non-numerical data item. It is also possible to use the PARSe and NOPArse
commands to set the appropriate mode of data input.
In Windows versions it is sometimes desirable to obtain the input file name from a
pop-up menu. This is accomplished by setting the parameter CIFLG to true.
During the input of plot commands FEAP has the option to either set input options
automatically (DEFAult mode) or to read the values or range of contours to plot. The
default mode of operation may be assigned in the feap84.f module by setting the
variables DEFALT and PROMPT. Setting DEFALT to true indicates that all default options
are to be set automatically. If DEFALT is set false, a prompt for contour intervals may
be requested by setting PROMPT to true.
FEAP has options to produce encapsulated PostScript output files in either gray scale
of in color. The default mode may be established by setting the variable PSCOLR and
PSREVS. Setting PSCOLR true indicates the PostScript files will be in color (unless set
otherwise by the PLOT COLOr data command. The PSREVS variable reverses the color
sequence.
The last parameter which may be set in the feap84.f module is the level for displaying
available commands when the HELP command is used while in mesh, solution, or plot
mode. FEAP contains a large number of commands which are not commonly used by
many users. To control the default number of commands displayed to users the com-
mands have been separated into four levels: (0) Basic; (1) Intermediate; (2) Advanced;
and (3) Expert. The level to be displayed when using the HELP command is given may
be set in the integer variable HLPLEV. That is, setting:
hlplev = 1 ! Intermediate
integer ndebug
logical debug
common /debugs/ ndebug,debug
CHAPTER 1. INTRODUCTION 3
The value of the debug is set true by the solution command DEBUg and false by the
command DEBUg,OFF. Thus, placing code fragments into modules as
if(debug) then
write(iow,*) ’LABEL’,list ... ! writes to output file
c and/or
write( *,*) ’LABEL’,list ... ! writes to screen
endif ! debug
FEAP contains many COMMON statements that are used to pass parameters and small
array values between subprograms. For example, access to the debugging parameter
debug is facilitated through common /debugs/. Users may either place the common
statement (as well as data typing statements) directly in the routine or may use an
include statement. For debugging the statement would be
include ’debugs.h’
which during compilation would direct the precompiler to load the current common
statement from this file. In FEAP all include files have the same name as the common
with an added extender .h. For example, the common file name comblk.h is defined
as
real*8 hr
integer mr
common /comblk/ hr(1024),mr(1024)
The arrays hr(1024) and mr(1024) serve to pass all dynamically allocated arrays be-
tween subprograms using a pointer array contained in the common array named np(*)
[or for user defined arrays in up(*)] located in the include file pointer.h. 1 See Sec-
tion 3 for more details on use of pointers. All include files are located in the directories
1
The values 1024 are necessary to ensure loops on arrays using pointers directly are considered as
long.
CHAPTER 1. INTRODUCTION 4
It is highly recommended that users use include files rather than giving equivalent
common statements directly. If later releases of the FEAP program revise contents in
a common block, it will only be necessary to recompile the user routine rather than
change all the common statement definitions. Also, by defining the correct path in
the makefile.in on your compiler it is not necessary to modify any routine when
switching from 32-bit machines to 64-bit machines.