← Back to team overview

dolfin team mailing list archive

simple support BCs

 

Hi,

This seems like it should be easy, so I am sorry I have to ask. How do I set a simple support (i.e. fixed dof in x, free dof in y) in a 2D elasticity problem. I have figured out how to do it if I am weakly enforcing Dirichlet BC's in a DG formulation, but I can't figure out how to do it for the classical formulation using BoundaryConditions.

Here is what I have tried (among other things) using pieces of code from the elasticity demo, but for 2D...

.
.
.
Clamp c(mesh);
Function cx = c[0];
Left left;
BoundaryCondition bcl(cx, mesh, left);
.
.
.

But I get an error that says

terminate called after throwing an instance of 'std::runtime_error'
what(): *** Error: Sub functions can only be extracted from discrete functions.
Aborted


After nosing around a bit, its not clear if I need to create a SubSystem or not, but I think I would run into the same problem as above.
Any suggestions will be appreciated.

-Jake


Follow ups