# Incompatible boundary conditions in parallel FreeFEM

**URL:** <https://community.freefem.org/t/incompatible-boundary-conditions-in-parallel-freefem/2347>\
**Category:** General Discussion\
**Created:** [March 21, 2023, 4:10pm UTC](https://community.freefem.org/t/incompatible-boundary-conditions-in-parallel-freefem/2347 "2023-03-21T16:10:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fagnelli](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/fagnelli/32/1211_2.png) [@fagnelli](https://community.freefem.org/u/fagnelli)\
**Post date:** [March 21, 2023, 4:10pm UTC](https://community.freefem.org/t/incompatible-boundary-conditions-in-parallel-freefem/2347/1 "2023-03-21T16:10:46Z")

</div>

Hi,  
I am trying to test FreeFem parallel (combined with PETSc) by solving the following linear elastic problem:

- a 2D truss is clamped at the left end and loaded at the right end with a surface force pointing downwards.
- the geometry is constructed as follows:

```auto
// Domain of admissible shapes: mesh parameters
real L=2.; // length [m]
real H=1.; // height [m]
int nel=80; // mesh density

/* Domain Mesh */
mesh Dh;
int Tn0=0; // label denoting the free part of the boundary
int Tn1=1; // label denoting the loaded part of the boundary
int Td0=10; // label denoting the fixed part of the boundary

if (!mpirank) {
	if (verbosity) cout<<" Domain Mesh Generation"<<endl;
	Dh=square(int(L)*nel, int(H)*nel, [L*x,H*y], flags=1);

	{ func nlabel=(y<1.e+2)? Tn0: label; Dh=change(Dh, flabel=nlabel);}
	{ func nlabel=(x<1.e-5)? Td0: label; Dh=change(Dh, flabel=nlabel);}
	{ func nlabel=(x>(L-1.e-5) && y>(H/2-H*0.05) && y<(H/2+H*0.05))? Tn1: label;
	Dh=change(Dh, flabel=nlabel);}
}

broadcast(processor(0), Dh);
meshN DhG=Dh; // global mesh

int[int] n2o;
macro DhN2O() n2o // EOM // keep local to global correspondance in buildDmesh
buildDmesh(Dh); // domain decomposition

```

As I solve the problem using 4 nodes, I get the following message:

```auto
  Elasticity problem
 Warning: -- Your set of boundary condition is incompatible with the mesh label.
 Warning: -- Your set of boundary condition is incompatible with the mesh label.
 Warning: -- Your set of boundary condition is incompatible with the mesh label.
 --- system solved with PETSc (in 2.025411e+00)

```

When I look at Dh in Paraview for example, I see that Tn1 is only existing in one of the 4 subdomains… hence 3 warning messages.

The problem may come from the ways labels are propagated in buildDmesh… I would be grateful if you could you help me correct the domain decomposition part such that this error disappears. If needed, I can provide the full code (176 lines).

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [March 22, 2023, 6:02am UTC](https://community.freefem.org/t/incompatible-boundary-conditions-in-parallel-freefem/2347/2 "2023-03-22T06:02:40Z")

</div>

This is not an error, just a warning, that can be turned off with `verbosity = 0;` before the assembly.
