12.07.2015 Views

FEniCS Course - FEniCS Project

FEniCS Course - FEniCS Project

FEniCS Course - FEniCS Project

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Step by step: more about defining domainsFor a Dirichlet boundary condition, a simple domain can be definedby a string" on_boundary " # The entire boundaryAlternatively, domains can be defined by subclassing SubDomainclass Boundary ( SubDomain ):def inside (self , x, on_boundary ):return on_boundaryYou may want to experiment with the definition of the boundary:" near (x[0], 0.0)" # x_0 = 0" near (x[0], 0.0) || near (x[1], 1.0)"There are many more possibilities, seehelp ( SubDomain )help ( DirichletBC )16 / 22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!