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.
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.xYou might have chosen another location during installation, in which case you must accordingly modify the description below.
| Variable | Value |
MACHINE_TYPE | Win32-VC80 |
DPDIR | C:\Program Files\Diffpack\4.0.x |
BTR | %DPDIR%\bt |
LAR | %DPDIR%\la |
DPR | %DPDIR%\dp |
MDR | %DPDIR%\md |
DP_BINARY_FORMAT | plainC |
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 |
echo %DPDIR%. If the values are non-present or invalid, correct the settings manually.
%DPDIR%\etc\setup\DpSetup.bat. Check that this file is invoked from your
C:\autoexec.bat file, typically by these statements:
set DPDIR=C:\PROGRA~1\DIFFPACK\4.0.x
call %DPDIR%\ETC\SETUP\DPSETUP.BAT
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:nnnnin 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.
%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 |
%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.
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.
%DPDIR%\html\index.html
in your favourite web browser. This file is also accessible from the Start->Programs->Diffpack 4.0.x
menu.
%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.
| Debug mode | Release mode |
NUMT=double |
|
WIN32 |
|
_MCBS |
|
_CONSOLE |
|
_DEBUG | NDEBUG |
SAFETY_CHECKS | POINTER_ARITHMETIC |
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.
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 mode | Release mode |
NUMT=double |
|
WIN32 |
|
_AFXDLL |
|
_WINDOWS |
|
MFCDP_MENUS |
|
VTK_GRAPHICS |
|
_DEBUG | NDEBUG |
SAFETY_CHECKS | POINTER_ARITHMETIC |
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.
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:
| Macro | Software unit |
DP_ADAPTIVITY | Adaptivity toolbox |
DP_DATAFILTER | Datafilter toolbox |
DP_MULTILEVEL | Multilevel toolbox |
%DPDIR%\doc\Application Templates for ready-to-go
setups.
NUMT=Complex |
NUMT_IS_COMPLEX=1 |
%DPDIR%\doc\Book\src\fem\complex directory.
Any technical questions can be directed to support@inutech.de
Happy Diffpacking!
inuTech GmbH