Package esys :: Package lsm :: Package examples :: Module Wave2d
[hide private]
[frames] | no frames]

Module Wave2d

Classes [hide private]
  MyExpSourcePrms
  MyCircularSourcePrms
  MyLinearSineSourcePrms
  PVisitor
Objects of this class are used in conjunction with the waveProp.visitParticlesWithId method to collect model particle data.
Functions [hide private]
 
writeDisplacementData(idList, index, lsm, fileNamePrefix="displacement_")
Writes particle displacement data to file.
Variables [hide private]
  radius = 1.0
  particles = CubicBlock([nx, ny, nz], radius)
  bBox = particles.getParticleBBox()
  centrePt = bBox.getMinPt()+ bBox.getMaxPt()* 0.5
  connections = DistConnections(0.25, 0, particles)
  waveProp = WavePropagation(domainBox= bBox, do2d= (nz== 1), nu...
  tag = 1
  approxSourcePosn = bBox.getMinPt()+ bBox.getMaxPt()* 0.5
  sourcePosn = waveProp.sourceList [0].getInitialPosn()
  wallBondSpringK = 1.0
  pt1 = Vec3(bBox.getMinPt())
  pt2 = Vec3(sourcePosn)
  numSeismos = 20
  diff = pt2-pt1
  interSeismoDistance = max([radius* 2, diff.norm()/ float(numSe...
  incr = diff/ diff.norm()* interSeismoDistance
  seismographPosnList = []
  numTimeSteps = 4000
  idList = [p.getId() for p in particles]
  j = 0
  t1 = None
Function Details [hide private]

writeDisplacementData(idList, index, lsm, fileNamePrefix="displacement_")

 

Writes particle displacement data to file. Each line of the file is 'px py pz dx dy dz' where p=(px,py,pz) is the particle position and d=(dx,dy,dz) is the current particle displacement (ie position relative to initial position).

Parameters:
  • idList - list of particle id's.
  • index - integer used to generate file name.
  • lsm - a LSM object.
  • fileNamePrefix - prefix of file where displacement data is saved.

Variables Details [hide private]

waveProp

Value:
WavePropagation(domainBox= bBox, do2d= (nz== 1), numWorkerProcesses= 2\
, mpiDimList= [2, 1, 1], timeStepSize= 0.04)

interSeismoDistance

Value:
max([radius* 2, diff.norm()/ float(numSeismos)])