← Back to team overview

dolfin team mailing list archive

Re: [Question #122849]: How to make a hole in a uniform mesh

 

Question #122849 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/122849

    Status: Open => Answered

Anders Logg proposed the following answer:
On Thu, Aug 26, 2010 at 03:05:00PM -0000, Øystein Sørensen wrote:
> New question #122849 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/122849
>
> I am trying to make a uniform mesh, something like
> mesh = Rectangle(0,0,4,1,nx,ny)
> and then make two holes inside the mesh. The holes are supposed to represent a source and a sink, with inner boundary condition du/dn=f on the boundary of the holes.
> I am aware that this is pretty straightforward to do in some external preprocessor, but I wonder if it is possible to implement this straight into Dolfin.
> Ideally, the holes should be small (e.g. [0.01,0.01] squares).
> Any idea?
> Or may I alternatively define some inner boundary and implement the boundary condition on this?

This is easy to do in DOLFIN.

Take a look at this demo:

  demo/mesh/smoothing/python/demo.py

--
Anders

-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.