# Contents of /branches/stage3.1/doc/examples/usersguide/mount.py

Revision 2945 - (show annotations)
Wed Feb 24 00:17:46 2010 UTC (8 years, 11 months ago) by jfenwick
File MIME type: text/x-python
File size: 2009 byte(s)
```Bringing release stage up to trunk version 2944

```
 1 ######################################################## 2 # 3 # Copyright (c) 2003-2010 by University of Queensland 4 # Earth Systems Science Computational Center (ESSCC) 5 6 # 7 # Primary Business: Queensland, Australia 8 # Licensed under the Open Software License version 3.0 9 10 # 11 ######################################################## 12 13 __copyright__="""Copyright (c) 2003-2010 by University of Queensland 14 Earth Systems Science Computational Center (ESSCC) 15 http://www.uq.edu.au/esscc 16 Primary Business: Queensland, Australia""" 17 __license__="""Licensed under the Open Software License version 3.0 18 19 __url__= 20 from esys.escript import * 21 from esys.escript.models import Mountains 22 from esys.finley import Brick,Rectangle 23 from math import pi, ceil 24 25 NE=16 26 DIM=3 27 H=1. 28 L=2*H 29 OMEGA=10 30 EPS=0.01 31 t=0 32 T_END=0.05 # set T_END=(2*pi)/OMEGA to run a full simulation 33 n=0 34 if DIM==2: 35 mydomain=Rectangle(int(ceil(L*NE/H)),NE,l0=L,l1=H,order=1, useFullElementOrder=True,optimize=True) 36 else: 37 mydomain=Brick(int(ceil(L*NE/H)),int(ceil(L*NE/H)),NE,l0=L,l1=L,l2=H,order=1, useFullElementOrder=True,optimize=True) 38 39 x=mydomain.getX() 40 v = Vector(0.0, Solution(mydomain)) 41 if DIM==2: 42 a0=1 43 n0=1 44 n1=0.5 45 a1=-(a0*n0)/n1 46 v[0]=a0*sin(pi*n0*x[0])* cos(pi*n1*x[1]) 47 v[1]=a1*cos(pi*n0*x[0])* sin(pi*n1*x[1]) 48 else: 49 a0=1 50 a1=1 51 n0=2 52 n1=2 53 n2=0.5 54 a2=-(a0*n0+a1*n1)/n2 55 v[0]=a0*sin(pi*n0*x[0])* cos(pi*n1*x[1])* cos(pi*n2*x[2]) 56 v[1]=a1*cos(pi*n0*x[0])* sin(pi*n1*x[1])* cos(pi*n2*x[2]) 57 v[2]=a2*cos(pi*n0*x[0])* cos(pi*n1*x[1])* sin(pi*n2*x[2]) 58 59 60 mts=Mountains(mydomain,eps=EPS) 61 while t

## Properties

Name Value
svn:mergeinfo /branches/lapack2681/doc/examples/usersguide/mount.py:2682-2741 /branches/restext/doc/examples/usersguide/mount.py:2610-2624 /trunk/doc/examples/usersguide/mount.py:2872-2919,2924-2944