> > I can extract all the problem >> > related arrays without much difficulty, but the boundary conditions are >> more >> > vexing since in the forms I can readily access, the locations where each >> > boundary condition is applied live as unresolved union and intersection >> of >> > boolean arrays buried inside the FixedValue or FixedFlux instances. Is >> > there an approved method for extracting and resolving this location >> > information? If not, is there an easy hack I can use? >> > > This is not particularly "approved", but not particularly "disapproved", > either: > > As you've found, bc.faces contains a binOp Variable representing whatever > conditions defined the boundary, so, e.g., > > >>> bc = FixedValue(faces=mesh.getFacesLeft() & (Y > 2.), value=1.) > >>> bc.faces > > will dump a mess like > > (FaceVariable(value=array([False, False, False, False, False, False, > False, False, False, > False, False, False, True, False, False, False, True, False, > False, False, True, False, False, False], dtype=bool), > mesh=UniformGrid2D(dx=1.0, dy=1.0, nx=3, ny=3)) & [False False False False > False False False False False True True True > False False False False False False False False True True True > True]) > > but > > >>> bc.faces.getValue() > > will return a mask array. > > That's hopefully what you needed.
That is exactly what I needed. Thanks so much!
