i was given some vector velocity data once where the grid for each component of the vector was different. each grid was offset by 1/2 step only in its dimension. so i had x velocity at (0.5, 0, 0), (1.5, 0, 0), ... and y velocity at (0, 0.5, 0), (0, 1.5, 0), ... and z velocity at (0, 0, 0.5) (0, 0, 1.5), ...
actually, i'm pretty sure that the data came with the first point at (-0.5, 0, 0) so the new grid i was building was entirely inside the old grids, so i didn't have to worry about interpolating outside the original volume. (if i had needed to interpolate 1/2 cell outside the volume, and i had to do this in dx instead of changing the simulation, i think i'd try it by starting with Slab to turn my volume into a series group of slices, then using Select to get the first and last slice, and ChangeGroupMember to insert a new copy of slice 0 in front of slice 0, and insert a second copy of the last slice after the last slice, setting the series position to be correct because that's what controls how they get put back together. then call Stack to make it a 3d volume again with new layers added in one dimension. but i find this getting dangerously close to the "i've got a hammer so everything looks like a nail" syndrome. just because you *can* do it in dx doesn't mean it makes the most sense to do it there.) anyway, then i used Construct to make a grid at (0,0,0) (1,0 0), etc, and used Map to compute the data on this new grid. because it was offset only along one dimension it was doing linear interpolation in each cell. this is different from the Post trick (which i've also used frequently) in that no averaging was done. i did this 3 times for each of x, y, z and then used Compute to paste the vectors together and then exported the file. i'm sure this isn't the exact answer to alex's problem, but with Map you can control exactly where the new points are, especially at the borders, and can count on interpolation instead of smoothing from averaging. nancy From: "Thomas A. Gardiner" <[EMAIL PROTECTED]> Subject: Re: [opendx-users] Unstructured grids I think you will find, as I did, that most people will regard DX as a visualization tool, rather than a data manipulation tool. Why don't you just write a post-processing routine to add an additional set of data points on the boundarys of the grid cells with values equal to the cell centered value? Or if you don't like that idea, use the values in neighboring cells, calculate a slope for your "volume averaged data?" and store say the mean of the projected values (from left and right) at the grid cell corners, or nodes. These are just ideas which I would try first, second, third, etc. even 100 before re-writing my numerical integration scheme. Tom On Mon, 30 Oct 2000, Alexander Berreth wrote: > >When doing this, I will have to tell dx the midpoints of each cell. This will >result in >a slightly smaller picture, as the bondaries are cut off. But especially in my >case I need to have the exact boundary of my domain, because I have multiple >domains and blanked regions. The only possibility I see now is to make >an lagrange transformation in my code to compute the values on the gridpoints >out of the cell centered data, but this is expected to be a lot of work. >I thought, there might be a module or something in DX wich will do this >transformation, >as we have the possibility to import cell centered (connection dep.) data. > >If someone has an idea how to solve this problem with DX it would be great.... > >Alex > >
