[firedrake] Solve a Variational problem in a part of the domain
Lawrence Mitchell
lawrence.mitchell at imperial.ac.uk
Thu Aug 6 11:04:25 BST 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Anna,
On 06/08/15 10:37, Anna Kalogirou wrote:
> Dear all,
>
> I have a rather simple question but I would like to get some
> feedback from someone in the Firedrake team.
>
> I am now working on the problem which includes solving a
> variational problem in a part of the domain only (a water wave
> problem which includes a floating body).
>
> I can think of a couple of possible solutions on how to solve this:
> 1. Define two domains and solve the problem separately in each
> domain. However, I will have to deal with nonzero boundary
> conditions on the common boundary.
>
> 2. I prefer solving the problem in the whole domain, since most of
> the equations/functions are valid everywhere. Then I can define a
> Heavyside step function which will be 0 in one part and 1 in the
> part of the domain I am interested in (under the floating body). I
> will essentially write down a variational problem valid everywhere,
> but will actually be zero in a part of the domain.
>
> Is the 2nd step a good approach? The question essentially is how
> to split a mass matrix M_kl which is defined everywhere, and solve
> and integral form in a part of the domain only.
I think step two is a fine approach. However, note the following
issues at present. The way you would have to do this currently is as
follows:
Define a DG0 field to hold your indicator function
indicator = Function(DG0)
# Set it to 1 in the appropriate part of the domain
indicator.interpolate(...)
# Now use this extra field everywhere when defining your variational
# problem.
However, all your integrals are still over the whole domain, you just
pick up lots of zeros.
Steadily climbing our todo list (and at an increasing pace, I feel),
is the ability to define proper sub domains in a mesh, and then be
able to perform integrals over them. Until that time, I think
approach 2 is somewhat easier to do than approach 1.
Cheers,
LAwrence
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBAgAGBQJVwzElAAoJECOc1kQ8PEYvGswIAN+Mr6hD+U0NmsnZAGminaq+
j/SqmI+o7GlbXRSgPqEfrpyWwFiiFVN6DnPmTboRooZr3h93ZhGDhECQ/O12XKA/
00yNuCiDn4YBaXJamWBM6u8ILdZYGMyVNTG1JOaZZIMBoiIkrTyYpXatGApcE4sD
4T+DoAYSUEY7u6MV4eJmRc1lzZEd8Rw43YP+Viy0itCs2jKV+HsDpvpvu1DU/FSQ
zMeE/cRR8It6aImk1L3OON8Zo2ZB0HNirK6YuD3sMkIoqLEYANnNl8qaeU3LL227
3TL4ddkALXQLGaYGo5ETgtMKI6afNDIsfjwGUcVRhTTxHM3GKOMQgWV6miNtgv4=
=wE25
-----END PGP SIGNATURE-----
More information about the firedrake
mailing list