Hi, all,
I want to create a vector with prescribed dofs on the Dirichlet boundary, just like the following:
from dolfin import *
# Functionspace and Dirichlet Bcs
V = VectorFunctionSpace(MyMesh, "Lagrange", 1)
bcs = DirichletBC(V, imposed_displacement, definedSubDomain)
# The solution vector
v = Function(V)
# The vector I need:
v_p = Function(V) # except those dofs prescribed in bcs, all the other are zero.
I found a very similar question: enter link description here
But it is very complex and hard to understand. I think there should be some simpler routines to this task. Could anyone give any hint? Thanks!