next up previous contents
Next: libstokes: Library for Stokesian Up: Wrappers Previous: Guile

Octave

For Octave[7], there is no SWIG[2]. Currently only the function stokes_res_3f() is exported. You can call it in Octave script something like that;
## sample code for stokes_res_ewald_3f()
## Copyright (C) 2006-2007 Kengo Ichiki <kichiki@users.sourceforge.net>
## $Id: manual.tex,v 1.5 2008/10/12 20:16:53 kichiki Exp $

# lattice vector
l = [10.0, 10.0, 10.0]

# position of particles (np = 8)
pos = [0.0, 0.0, 0.0,\
	0.0, 0.0, 5.0,\
	0.0, 5.0, 0.0,\
	0.0, 5.0, 5.0,\
	5.0, 0.0, 0.0,\
	5.0, 0.0, 5.0,\
	5.0, 5.0, 0.0,\
	5.0, 5.0, 5.0]

# velocity of particles
u = [1.0, 1.0, 1.0,\
      1.0, 1.0, 1.0,\
      1.0, 1.0, 1.0,\
      1.0, 1.0, 1.0,\
      1.0, 1.0, 1.0,\
      1.0, 1.0, 1.0,\
      1.0, 1.0, 1.0,\
      1.0, 1.0, 1.0]

# solve resistance problem and obtain force
f = stokes_res_3f(pos, u, l, 60.25)



Kengo Ichiki 2008-10-12 SourceForge.net Logo Free counter and web stats