Direct definition of Dirichlet boundary condtions at the degrees of freedom
I am constructing a Hybrid code using Dolfin.
I set up a Navier-Stokes solver where I prescribe only Dirichlet boundary conditions on the velocities. This works fine.
The problem is that now I define the boundary conditions for the velocity in the following way:
g = Expression(
bc = DirichletBC(V, g, boundaryDomains,3)
where V is a function space associated to my mesh and boundaryDomains is a meshFunction that specifies my boundary.
My question is the following.
If I do not have a g as an expression, that is, if I only have a list of coordinates of the degrees of freedom at the boundary or a list of the index of the degrees of freedom at the boundary and the associated value of the Dirichlet boundary condtion, how can I define the boundary conditions?
Somewhere Dolfin needs to construct such a list of indices of DOF and associated value of the boundary condition. Something like the function:
bc.get_
My problem would be solved if in the assemble process bc.get_
Is this possible and could you give me some short indications on how to accomplish this? Or is there another solution?
Thank you!
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Artur Palha
- Solved:
- Last query:
- Last reply: