This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

How to pass Boundary Boolean values as python list or array?

+1 vote

Firstly, my thanks to the FEnics community for all the answers in the Q&A. I would like to apply Dirichilet boundary conditions using a python list which is a sorted boolean list of values matching the mesh order (exact order), I have attached an explanation for what I am trying to ask below,

V = VectorFunctionSpace(mesh, 'CG', 2)
b_v = DirichletBC(V, Constant((0, 0,0)), NoslipBoundary())
b_v1 = DirichletBC(V, Constant((0, 0,0)),"A Boolean list of where to apply the condition")
bcs_v=[b_v,b_v1]

and then do

[bc.apply(A, b) for bc in bcs_v]
is it possible to do this?

asked Jan 8, 2016 by newcommer FEniCS Novice (310 points)
...