# [Gmsh] Boundary Conditions.

Christophe Geuzaine geuzaine at acm.caltech.edu
Tue Oct 19 16:39:31 CEST 2004

```Stott CH Mr (PG/R - Maths & Statistics) wrote:
> Hi,
>
> I've searched through the manuals and the mailing list archives, but
> can't find an answer to this.
>
> Say I define a square domain...
>
>  lc=0.1;
>
>  Point(1) = {0, 0, 0, 0.1*lc}; Point(2) = {1, 0, 0, lc}; Point(3) = {0,
> 1, 0, lc}; Point(4) = {1, 1, 0, lc};
>  Line(1) = {1,2}; Line(2) = {2,4}; Line(3) = {4,3}; Line(4) = {3,1};
>
>  Line Loop(5) = {1,2,3,4};
>  Plane Surface(6) = {5};
>
> I want to use this with a diffusion solver, with two types of boundary
> conditions (Dirichlet and Neumann). So I set up some Physical Entities,
>
>  Physical Line(10) = {1,2,3};
>  Physical Line(11) = {4};
>
>  Physical Surface(100) = {6};
>
> Say I want to have a zero Neumann condition on Physical Line 10, and a
> non-zero Dirichlet condition on Physical Line 11. Do I have to hard code
> the numerical values of these into my solver? or is there someway of
> attaching extra data to a Physical Line?

No: the only purpose of the physical entities is to tag some of the
elements in your mesh with specific integers. It's up to you to give a
meaning to these tags in your solver.

Christophe

--
Christophe Geuzaine
Applied and Computational Mathematics, Caltech
geuzaine at acm.caltech.edu - http://geuz.org

```