# Suppress or turn off degrees of freedom

Dear all,

How can we set the degrees of freedom to be 0 in a region (similar to a boundary condition)?
or turn off so that this region would not be assembled?

You can remove points from the mesh of course - I think “trunc” is used for 2D meshes.

You can assign a varf to a matrix that i represents the equations to be solved
and put in it whatever you want. For the penalty method search docs for “tgv”
which I think is french but with similar english expansions I have had a few issues however understanding how the memory works
especially with vector fespaces although the approach seems
to be wisdely used with expected results.

1 Like

I do not understand what you wan:

Defined a problem where the solution will be zero some where
and the some where is a part on the domain.

If it is this , I need the formulation of the problem.

1. How to use Lagrange multiplier method to implement a Dirichlet boundary condition?

2. If we have two connected regions -fluid and solid. Velocity is defined on both regions/meshes, but displacement is only defined on the solid region. Not sure is this legal to put this into to one variation form such as the following (that’s why my initial idea was define the displacement on the whole region and turn it off on `Thf`)?

``````mesh Th = Ths + Thf;

fespace Vh(Th,P2);
fespace Vhs(Ths,P2);

Vh u, v, uh, vh;
Vhs d, dh;
varf fsi([u,v,d],[uh,vh,dh]) =
int2d(Th)(...u..v..)  + int2d(Ths)(...d...)
``````