← Back to team overview

ffc team mailing list archive

Re: [question103102@xxxxxxxxxxxxxxxxxxxxx: Re: [Question #103102]: multiply spatial coordinates x in the variational formulation]

 



On 4 March 2010 20:45, Anders Logg <logg@xxxxxxxxx> wrote:
On Thu, Mar 04, 2010 at 08:35:49PM +0100, Kristian Oelgaard wrote:


On 4 March 2010 19:49, Anders Logg <logg@xxxxxxxxx> wrote:
>Could you add a demo for this?

Sure, to FFC, DOLFIN or both?
The Poisson demo would be good to do because it has both dx and ds integrals.

Kristian

Both.

What would the Poisson demo look like with this feature?

element = FiniteElement("Lagrange", triangle, 1)

v = TestFunction(element)
u = TrialFunction(element)

x = triangle.x[0]
d_x = triangle.x[0] - 0.5
d_y = triangle.x[1] - 0.5
f = 10.0*exp(-(d_x*d_x + d_y*d_y) / 0.02)
g = sin(5.0*x)

a = inner(grad(v), grad(u))*dx
L = v*f*dx + v*g*ds

What should we call the demo, and where do we put it in DOLFIN?

Kristian

--
Anders

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkuQDc0ACgkQTuwUCDsYZdHIKwCffXYlQdeq+14pKrWhSAgtmTQn
C3YAnjmeSG75WfLojfI56pKQqzD/VDjO
=RHAJ
-----END PGP SIGNATURE-----



Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References