So, instead of combining these, then trying to invalidate some, why not just keep them separate? If you like, you can combine them as a Group in the .dx file (to keep things together). Don't use a Multigrid, as then I think the Streaklines may still try to pass through the boundary. But when you Import the group, use two Selects to pull the 2 members out. Pass only the "good" vector field to Streakline, but generate a realization of each input field and Collect the results before Image. So, you might have the ShowConnections only of the external field, wrapped around the interior field which is being realized with Streakline.
To answer the question you asked, rather than the one I made up:
A field may contain a component called 'invalid positions' which must be byte(0) = valid or byte(1) = invalid and obviously position dependent.
So you will probably have to employ Compute (a<0 ? byte(1) : byte(0)).
But I'm not clear on whether you've defined a value like +1 for all the interior points. In other words, given a field A with 100 positions and 100 data values (velocity vectors, say), and a field B with 100 positions (ideally, the same, but that's not absolutely necessary: the presumption is that they are to make any sense for the following...) and 100 data values (flags), you can Replace(B,A,"flag","invalid positions") to merge the two into A' which now has the same A positions and A vectors and also what was the B data, but now it's called 'invalid positions'. That assumes you have a flag for every position (good and bad) in A. It also assumes you've prepared "flag" using Compute as illustrated.
You don't need Include then in many cases, as the 'invalid positions' masks off the undesired stuff in many operations (I hope Streakline!).
On Tuesday, Jun 15, 2004, at 02:50 America/New_York, Allen H. Nugent wrote:
Dear DXplorers,_______________________________
To make {Streaklines} work correctly for an internal flow, I thought it would be useful to define a flag that is "0" on the wall of the pump housing and "-1" outside. I created positions & connections & data for the exterior points, and included them with the actual data before using {Import}.
The idea is that the velocities are genuinely zero on the wall, so they need to be valid, whereas points outside the wall (where flag = -1) should be invalidated. I figure this is how to prevent streaklines from passing through the wall of the pump housing.
My problem is that I can't figure out how to make {Include} work only on the "flag" field, which is the 2nd member of the group (the first being the "velocity" 3-vector).
Is there a way to do as I describe, or is there a better way?
Thanks!
Allen H. Nugent
Graduate School of Biomedical Engineering
University of New South Wales
Sydney NSW 2052 Australia
Tel: +61 2 9385 3916 Fax: +61 2 9663 2108
Chris Pelkie
Scientific Visualization Producer
622 Rhodes Hall, Cornell Theory Center
Ithaca, NY 14853
