← Back to team overview

dolfin team mailing list archive

meshes within meshes and functionspaces within functionspaces

 

Hi, I have an application where there is a mesh M1 within another mesh M0,
(heart and body). Some of the unknowns (intra-cellular potential) live only
in the heart while other live in the whole body (extra-cellular potential).

I would like to generate a few matrices in this applications, written
on block forms as

   [ M00, M01 ]
   [ M10, M11 ]

where M00 is nxn, M11 is mxm, etc., where n is the number of unknowns
in the heart and m is the number of the unknowns in the complete body.

It is an advantage to not create two meshes because for the matrices
M01 and M10 basis functions from the heart mesh is multiplied
with basis functions from the other mesh. It is therefore nice to
represent the smaller mesh by the bigger mesh and an indicator
function. This way no searches is needed.

Say the matrices are defined by the variational forms:

m00 = ui*vi*dx(1)
m11 = ue*ve*dx
m10 = ue*vi*dx

Here ui, vi, dx(1) live only in the heart and ue, ve, dx live
in the body.

m00 should give a nxn matrix
m11 should give a mxm matrix
m10 should give a nxm matrix

to define this we could eg. have the following syntax:

VB = FunctionSpace(fe, mesh)    # the whole thing
VH = FunctionSpace(fe, mesh, subdomain1)   # only the heart

ui = TrialFunction(VH)
ue = TrialFunction(VB)  # (or usual def.: ue = TrialFunction(fe))

Does this make sense?
Am I the only one with the need for such ? If so I will make
a hacker's  approach instead of the generic approach.

Kent