← Back to team overview

dolfin team mailing list archive

Re: assembly on sub domains

 

On Fri, Jan 25, 2008 at 10:55:27AM -0500, Jake Ostien wrote:
> I have a question about general usage of SubDomains.  I have a problem 
> where I would really like to partition a domain (via some criterion) 
> into 2 sub domains, and then assemble the global system as two separate 
> assemblies over the sub domains.  The context here is for plasticity, 
> initially I have a domain that is elastic but evolves such that there 
> are two regions (elastic + plastic).  I am currently not dealing with 
> this in a very elegant manner, and I was hoping that if I could somehow 
> generate an elastic sub domain and a plastic sub domain, I could more 
> efficiently assemble.  Does that sound possible currently, or could I 
> add something like that in?  Eventually I think we'd like to extend the 
> concept to assembly over facets on the boundary of the elastic/plastic 
> interface as well, but this might be a good first step.
> 
> Jake

You can define a form as a sum of contributions from different
subdomains, for example:

  dx0 = Integral("cell", 0)
  dx1 = Integral("cell", 1)

  a = v*u*dx0 + dot(grad(v), grad(u))*dx1

This gives two terms, one of which will be used in subdomain 0 and the
other in subdomain 1.

Subdomains can be specified in DOLFIN by creating a subclass of
SubDomain and overloading the inside() function, or by specifying a
MeshFunction<uint> over the cells of the mesh.

You can also have integrals over arbitrary facets of the domain, like
for example the boundary between your two subdomains. You can have
several such integrals:

  ds0 = Integral("exterior facet", 0)
  ds1 = Integral("exterior facet", 1)
  ds2 = Integral("exterior facet", 2)

  dS0 = Integral("interior facet", 0)
  dS1 = Integral("interior facet", 1)
  dS2 = Integral("interior facet", 2)

-- 
Anders


References