Diffpack 4.0.x - Win32 Information

This document describes the Win32 distribution of the Diffpack 4.0.x software kernel. If you are going to install add-on toolboxes extending Diffpack's functionality, please make sure that you install this kernel first.

Diffpack is a library collection facilitating high-level design and implementation of simulation software dealing with numerical solution of partial differential equations (PDEs). You, as developer of Diffpack simulators, will create applications in C++ based on the tools provided in the Diffpack libraries.

In a Win32 environment, you will need the Microsoft Visual C++ compiler, version 8.0. If not already available, please install this system software before installing Diffpack, as the normal installation procedure will attempt to customize the Visual C++ enviroment for use with Diffpack software. For this to succeed, it is important that the Visual Studio IDE, which is the integrated environment in which Visual C++ works, have been started on your computer at least once. This ensures that the search paths for header and library files are modifyable for the Diffpack installer. However, if this sequence is not followed it is still quite simple to make the settings manually as explained below.

Contents

Hardware Requirements

For convenient use of Diffpack it is recommended that the target machine has at least a Pentium II processor with a minimum of 128 Mb RAM. The installation will occupy about 200 Mb of disk space. Better specification will in general provide better working conditions and possibilities for solving larger problems.

Installation

Load the CD-ROM and open the folder named "WIN32-VC80" by double-clicking it. Start the installation program "Setup.exe" by double-clicking its icon. Follow the instructions on screen, and restart your machine if this is requested by the installer. After successful installation you will get an entry named "Diffpack 4.0.x" on your Start->Programs menu.

IMPORTANT: Please notice that you will need administrator privileges when installing under Windows NT or Windows 2000.

Customizing Your Environment

For the rest of this document we will assume that you have installed Diffpack to the default location,
	C:\Program Files\Diffpack\4.0.x
You might have chosen another location during installation, in which case you must accordingly modify the description below.

Environment Variables

Diffpack relies on a number of environment variables, which are normally set by the installation procedure. These variables and their values are:

Variable Value
MACHINE_TYPEWin32-VC80
DPDIRC:\Program Files\Diffpack\4.0.x
BTR%DPDIR%\bt
LAR%DPDIR%\la
DPR%DPDIR%\dp
MDR%DPDIR%\md
DP_BINARY_FORMATplainC

The MDR variable will only be meaningful in the presence of add-on toolboxes.

In addition to the listed variables, the PATH variable should be set to include directories containing Diffpack utilities. The following directories should be included:

%DPDIR%\bin
%DPDIR%\ext\bin
%BTR%\bin
%DPR%\bin
%MDR%\bin

Normally, these settings are done automatically during installation of Diffpack. To check this, open an MS-DOS command line window and type the values of the variables, e.g. echo %DPDIR%. If the values are non-present or invalid, correct the settings manually.

IMPORTANT: Users upgrading from an older Diffpack installation under Windows NT/2000 will have to edit the PATH variable manually to get rid of the previous settings. This is necessary to avoid confusion between the old and new version of the software. Old versions can be uninstalled using the "Add/Remove Programs" control panel if it's no longer needed.

IMPORTANT:Under Windows 95/98, edit the C:\autoexec.bat file to remove the reference to the old version's DpSetup.bat file. In most cases users of Windows 95/98 also needs to extend the memory set aside for storage of environment variables. To do this enter

	shell=C:\command.com /p /e:nnnn
in your C:\config.sys, where nnnn is the number of bytes set a side for environment variables. This value must be in the range from 256 to 32,768.

Visual C++ Search Paths

Provided that Visual C++ 8.0 has been installed and started at least once before installing Diffpack, the Diffpack installer should be able to set the include and library paths correctly. If this is not successful, you can edit them manually. Start the Visual C++ environment and choose the Tools->Options menu item. Click the "Directories" tab. While choosing the "Include files" category, set the following search paths:

%DPDIR%\bt\include
%DPDIR%\la\include
%DPDIR%\dp\include
%DPDIR%\ext\include
%DPDIR%\ext\include\vtk
%DPDIR%\md\include

Choosing the "Library files" category, set:

%DPDIR%\bt\lib
%DPDIR%\la\lib
%DPDIR%\dp\lib
%DPDIR%\ext\lib
%DPDIR%\md\lib

The paths will have to be set explicitly, replacing %DPDIR% with its actual value. The paths referring to %DPDIR%\md are only used when Diffpack add-on modules have been installed.

IMPORTANT: When upgrading from an earlier version of Diffpack, please remove the search paths in Visual C++ referring to the old installation in order to avoid confusion between old and new code.

Utilities

There are a number of utilities available in the directories added to your PATH variable. These are discussed in the Diffpack book and other documentation. In %DPDIR%\bin you will also find several shell scripts that are commonly used in Unix environments. By installing a bash shell (http://www.cygwin.com), and/or a perl interpreter (http://www.perl.org or http://www.activestate.com), many of these utility scripts would be useful also in a Windows environment.

Documentation

For updated reference documentation, load the file %DPDIR%\html\index.html in your favourite web browser. This file is also accessible from the Start->Programs->Diffpack 4.0.x menu.

Visual C++ Project Setups

The definition of a Diffpack application project in Visual C++ requires a number of settings. These are listed below for different kinds of project setups. In general, it is encouraged to use the sample projects in %DPDIR%\doc\Application Templates as starters for your own coding. Copy the relevant folder, open the project workspace in Visual C++, remove the dummy source files and load your own code files. However, for the more adventurous souls, the details are given below.

Console Applications

Define the following preprocessor macros:

Debug modeRelease mode
NUMT=double
WIN32
_MCBS
_CONSOLE
_DEBUGNDEBUG
SAFETY_CHECKSPOINTER_ARITHMETIC

If you are going to use the Vtk visualization libraries, define VTK_GRAPHICS.

To keep the same notation for include files as in the Unix enviroments, using angle brackets rather than doublequotes, i.e.,

	#include <initDiffpack.h>
add the current directory (. as in "dot") to the "Additional include directories" field in your project settings. You also need to choose "Debug Multithreaded DLL" (Debug mode) or "Multithreaded DLL" (Release mode) in the "Use run-time library" field.

At the top of your main program's file, include the header file LibsDP.h. If you are using only functionality in the BTR or LAR branches, you can use LibsBT.h or LibsLA.h, respectively. These include files will set the library linking instructions using #pragma declarations.

See %DPDIR%\doc\Application Templates\Diffpack Console Application for a complete project setup.

Applications With Graphical User Interface

Instead of including LibsDP.h, GUI applications need to include dpgui/StdAfx.h and dpgui/LibsGUI.h (in that order) in the file containg your main program. You also have to rename your main function to GUImain. Moreover, the main simulator class should be derived from class GUIGlue available in dpgui/GUIGlue.h. The following preprocessor macros must be defined:

Debug modeRelease mode
NUMT=double
WIN32
_AFXDLL
_WINDOWS
MFCDP_MENUS
VTK_GRAPHICS
_DEBUGNDEBUG
SAFETY_CHECKSPOINTER_ARITHMETIC

Ignore the libraries nafxcw.lib (Release modeoe) and nafxcwd.lib (Debug mode) to avoid duplicate symbols.

See %DPDIR%\doc\Application Templates\Diffpack GUI Application for a complete project setup. Example applications from the Diffpack book using a GUI is available in the file tree %DPDIR%\doc\Book\src\GUI apps.

Extending Your Application With a Diffpack Toolbox

To extend a console application with functionality from a toolbox, replace the include statement for LibsDP.h with LibsMD.h. For GUI applications, keep the header dpgui/LibsGUI.h. In addition, define one or more of the following preprocessor macros:

MacroSoftware unit
DP_ADAPTIVITYAdaptivity toolbox
DP_DATAFILTERDatafilter toolbox
DP_MULTILEVELMultilevel toolbox

See the sample projects in %DPDIR%\doc\Application Templates for ready-to-go setups.

Solving Complex Valued PDEs

Start with the setup for a standard console or GUI application. Set

NUMT=Complex
NUMT_IS_COMPLEX=1

See the sample applications in the %DPDIR%\doc\Book\src\fem\complex directory.

Any technical questions can be directed to support@inutech.de



Happy Diffpacking!

inuTech GmbH