I am facing the below error while i am running elasticity tutorial problem: i.e. (ft06_elasticity.py).
I have changed the boundary condition from the Dirichlet on just x=0 face to all Dirichlet boundary on all the faces on the surface of the body.
Here is the snippet of the code in that field:
# Define Dirichlet boundary (x = 0 and x = 1)=Constant(0.0)
def boundaryX0(x):
return x[0] < DOLFIN_EPS and x[0] > 1.0 - DOLFIN_EPS and x[1]< DOLFIN_EPS and x[1]> 1- DOLFIN_EPS
u0 = Constant(0.0)
bc = DirichletBC(V, u0, boundaryX0)
However, this is the error that it is showing me:
**** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
*** fenics-support@googlegroups.com
*** Remember to include the error message listed below and, if possible,
*** include a minimal running example to reproduce the error.
*** -------------------------------------------------------------------------
*** Error: Unable to create Dirichlet boundary condition.
*** Reason: Expecting a vector-valued boundary value but given function is scalar.
*** Where: This error was encountered inside DirichletBC.cpp.
*** Process: 0
*** DOLFIN version: 2016.2.0
*** Git changeset: unknown
*** -------------------------------------------------------------------------*
I am not able to understand what I am doing wrong.
Please let me know what I should do to correct it.
Thanks
Ratnesh