The Mathematica Journal
Departments
Feature Articles
Columns
New Products
New Publications
Classifieds
Calendar
News Bulletins
Mailbox
Letters
FAQ
Write Us
About the Journal
Staff and Contributors
Submissions
Subscriptions
Advertising
Back Issues
Home
Download this Issue

Transforming Systems of PDEs for Efficient Numerical Solution

Andreas Wrangsjö, Peter Fritzson, K. Sheshadri
Department of Computer and Information Science
Linköping University
S-581 83 Linköping, Sweden
andwr@ida.liu.se; petfr@ida.liu.se; shesh@ida.liu.se

A Mathematica package to deal with a system of partial differential equations (PDEs) is presented. This package uses explicit finite-difference schemes to handle equations in an arbitrary number of variables that are functions of one spatial variable and time. The code has the flexibility to incorporate any difference approximation specified by the user, and transforms the given system of PDEs into a system of difference equations that can be iteratively solved using the discretized forms of initial and boundary conditions. The iteration is made considerably faster by converting the Mathematica code into an optimized C++ code using the MathCode C++ compiler [1]. Examples are presented in which the generated C++ code runs about a thousand times faster than the Mathematica code.

http://south.rotol.ramk.fi/~keranen/IMS99/paper7/Transformations.pdf
http://south.rotol.ramk.fi/~keranen/IMS99/paper7/Transformations.nb


Copyright © 2001 Wolfram Media, Inc. All rights reserved.

[Article Index][Prev Page]