On Wed, Apr 13, 2011 at 09:29:16AM +0200, Anders Logg wrote: > On Wed, Apr 13, 2011 at 07:13:46AM -0000, Josef Höök wrote: > > Question #152565 on DOLFIN changed: > > https://answers.launchpad.net/dolfin/+question/152565 > > > > Josef Höök posted a new comment: > > I have a similar problem ( question #150387 ). I'd like to project the > > point source, ( delta(X-x_i), phi_j(X) ). Is there any simple way of > > implementing this? > > Yes, coming right up.
Point sources are now supported in DOLFIN, using the new PointSource class. Example usage: p = Point(0.5, 0.5) delta = PointSource(V, p) delta.apply(b) Works like boundary conditions by applying them to the right-hand side of a system. You can have several point sources if you like. Try the following for a nice effect: n = 10 for i in range(n): theta = float(i)/float(n)*2.0*pi p = Point(0.5 + 0.2*cos(theta), 0.5 + 0.2*sin(theta)) delta = PointSource(V, p) delta.apply(b) I've pushed this to the logg-branch of DOLFIN and it will propagate to the main branch when it's been tested by the buildbot. You can get in directly by pulling from lp:~dolfin-core/dolfin/logg -- Anders _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp