File: intro.tex

package info (click to toggle)
python-escript 5.6-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 144,304 kB
  • sloc: python: 592,074; cpp: 136,909; ansic: 18,675; javascript: 9,411; xml: 3,384; sh: 738; makefile: 207
file content (93 lines) | stat: -rw-r--r-- 5,506 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright (c) 2003-2018 by The University of Queensland
% http://www.uq.edu.au
%
% Primary Business: Queensland, Australia
% Licensed under the Apache License, version 2.0
% http://www.apache.org/licenses/LICENSE-2.0
%
% Development until 2012 by Earth Systems Science Computational Center (ESSCC)
% Development 2012-2013 by School of Earth Sciences
% Development from 2014 by Centre for Geoscience Computing (GeoComp)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Why \esc?}
\esc is a scripting environment for mathematical modelling based on partial
differential equations (PDEs). It provides a high-level of abstraction from the
underlying numerical schemes and their implementations. By freeing the user from
considerations like data constructs, meshing and parallelisation, the user can
concentrate on the modelling aspects of the problem and still properly utilise
the powerful mathematical capabilities of PDEs. 

\esc is built upon the interpreted programming language \pyt\footnote{see
\url{www.python.org}}, a scripting language with many intrinsic functions and
capabilities. Additionally, there are also a large number of software packages
for \pyt which can be used in conjunction with \esc. These packages include
functions and data constructs for linear algebra, statistics, visualisation,
image processing and data plotting among others. Furthermore, most \esc scripts
are scalable and able to run on single core desktop computers right through to
multi-core supercomputers\footnote{\esc supports distributed memory
architectures with multi-core processors through MPI and threading. See the \esc
user guide at \url{https://launchpad.net/escript-finley/+download} for details.}
with no modifications to the scripts. 

There are many benefits for using a software platform like \esc for projects
that involve mathematical modelling. Building on top of an existing environment
such as \esc is in many cases much simpler and more cost effective than
building an original implementation from the ground up. A modelling environment
needs data structures and solution algorithms which take time to develop and
test properly, \esc has already covered these aspects and its implementation
has been widely tested for bugs. Although existing environments may not provide
the user with the fastest algorithms for their problems, it is generally the
case, that the overall time needed to identify, implement and test the optimal
algorithm will exceed the time needed to implement and solve the problem with
pre-developed and tested software. This is particularly true if a simulation
does not need to be executed repetitively, or has relatively short lifetime.
A model for a publication or thesis would be one such instance. 

When it comes to solving partial differential equations, \esc is ideal as it is
especially designed for this task. Other implementations are merely an add-on to
a linear algebra focused system (\textit{e.g.} MATLAB). The \esc approach gives
the user a cleaner environment to work with and provides better efficiency when
dealing with PDE coefficients. Data structures in \esc allow the user to
abstract away details such as data types of these coefficients. For example, if
a model has been tested with a constant PDE coefficient then the unchanged
script can be run with variable coefficients from a database or as a function of
a dependent variable. This capability of \esc is possible because \esc uses the
language of PDEs (as opposed to linear algebra) to describe a model. As it turns
out, the \esc approach can be applied efficiently in very large software
projects as it leads to a clearer structure for the code, by separating
modelling issues from low-level numerical and computational performance issues. 
At the same time, this arrangement also allows for the implementation of complex
model coupling on a higher-level. 

The use of \pyt as the platform for \esc makes the development of models simple
from a user perspective, as \pyt is intuitive and easy to learn. This simplicity
does not hamper experienced users either as \pyt also provides access to a very
large number of tools. This makes it an attractive environment to work in. Best
of all, \esc is released under an open software license and is freely available
for download.

\section{How to use this Cookbook}
This manual is written with the intention of giving new users a practical
introduction to \esc. It demonstrates how to solve a variety of problems from
simple to advanced. We recommend that new users work through the
\textit{first few sets of examples} in Chapters \ref{CHAP HEAT DIFF},
\ref{CHAP HEAT 2a} and \ref{CHAP HEAT 2}).
These chapters contain the necessary basic knowledge, and explain some of the
common aspects and modules of \esc. The simple examples demonstrate how to
create, solve and visualise PDE based models.
Future chapters (as they are added to this tutorial) will cover more advanced
topics with more complex models and methods. Further examples are available in
the \esc user guide.

All examples covered in this cookbook have been scripted and are ready to run.
They are available from the \exf folder in the \esc directory. These scripts
provide a basis for users to develop their own models while at the same time
demonstrating the steps required to completely solve and visualise the PDE
problems.

\input{quickstart}
\input{escpybas}