← Back to team overview

ffc team mailing list archive

Re: subdomains

 

On Tue, Nov 25, 2008 at 03:56:19PM +0100, Alessio Quaglino wrote:
> There is a function in FFC which seems very useful for my aim but I don't understand how to use it.  One part of my form is the following:
> 
> n = FacetNormal("triangle") 
> dsD = Integral("exterior facet", 0) 
> dsN = Integral("exterior facet", 1) 
> dsF = Integral("exterior facet", 2) 
> 
> a = ( dot(psi,b) - div(psi)*w + phi*div(b) )*dx + ( dot(b,n)*psi[0] + dot(b,n)*psi[1] )*dsF
> L = phi*f*dx - dot(psi,g)*dsN
> 
> What I want to do is to assemble the matrix splitting the boundary in 3 parts: dsD (no terms), dsN (1 term in a), dsF (1 term in L). However I don't understand how to pass to the form the subdomains I defined in dolfin. For example I have:
> 
> class DirichletBoundary : public SubDomain
> {
>   bool inside(const double* x, bool on_boundary) const
>   {
>     return x[0] < DOLFIN_EPS;
>   }
> };
> 
> which I would like to associate to dsD. Is there a way to do that?
> 
> Thank you,
> Alessio

Take a look at demo/pde/lift-drag/cpp/main.cpp in DOLFIN.

-- 
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups

References