/[escript]/trunk/doc/examples/cookbook/cerjen.py
ViewVC logotype

Annotation of /trunk/doc/examples/cookbook/cerjen.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6651 - (hide annotations)
Wed Feb 7 02:12:08 2018 UTC (12 months, 1 week ago) by jfenwick
File MIME type: text/x-python
File size: 933 byte(s)
Make everyone sad by touching all the files

Copyright dates update

1 sshaw 5707
2     ##############################################################################
3     #
4 jfenwick 6651 # Copyright (c) 2003-2018 by The University of Queensland
5 sshaw 5707 # http://www.uq.edu.au
6     #
7     # Primary Business: Queensland, Australia
8 jfenwick 6112 # Licensed under the Apache License, version 2.0
9     # http://www.apache.org/licenses/LICENSE-2.0
10 sshaw 5707 #
11     # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12     # Development 2012-2013 by School of Earth Sciences
13     # Development from 2014 by Centre for Geoscience Computing (GeoComp)
14     #
15     ##############################################################################
16    
17 sshaw 5706 from __future__ import division, print_function
18    
19 ahallam 2829 import pylab as pl
20     import numpy as np
21    
22     s=0
23     e=20
24     x = np.linspace(s,e,1000)
25    
26     y = np.exp(-1.0*(0.005*(s-x))**2)
27    
28     pl.plot(x,y)
29     pl.title("cerjen damping")
30    
31    
32    
33     pl.savefig("cerjen.png")
34    
35    
36     x2= np.linspace(0,0.1,333)
37    
38     y2=np.exp(-50.*x2)*np.sin(40*3.14157*x2)
39    
40     pl.clf()
41     pl.plot(x2,y2)
42     pl.savefig("source.png")

  ViewVC Help
Powered by ViewVC 1.1.26