[Paraview] block merging using Paraview

Andy Bauer andy.bauer at kitware.com
Thu Jan 28 13:16:23 EST 2010


Please keep the discussions on the mailing list so that others can
contribute and benefit from the information.

I think the best solution is to create a custom filter that stitches the two
rectilinear grids together in the way you want.  Most other solutions will
convert your rectilinear grids to unstructured grids and thus use a lot more
memory.

Usually when you split a grid into multiple grids you'll get visual
artifacts.

Andy

On Thu, Jan 28, 2010 at 12:12 PM, Julien Bodart <julien.bodart at gmail.com>wrote:

> I am more working on the first option.
> Actually those two files share a single uniform grid, so the space between
> the two blocks is exactly the cell size. (so in this simple case it is quite
> huge). The reverse question works as well:
> what happens if I split one single data file (with a rectilinear grid) in
> two files (with no connections), just two subsets and two subgrids, how to
> load them and see a "single grid".
>
> In my case loading the two files gives you all the grid nodes and then all
> the needed information, but it looks like you have two different blocks.
> In a finite volume point of view, maybe it means "adding one cell between
> the two blocks", but if the information is on the nodes like here, nothing
> more is needed.
>
> Your first solution works for me. I mean what you get using these simple
> files is exactly what I want.
> The problem there is the memory consumption (for example on my pc I can
> open two regular files using just 22% of the memory, the MergeBlock filters
> goes to 66% and then every action make paraview crash). It looks "the brute
> force" for something I was expecting to be just tricky. (no extra nodes
> needed)
>
> I hope it is more descriptive.
>
>
> 2010/1/28 Andy Bauer <andy.bauer at kitware.com>
>
>> I'm still not completely understanding what you want done.  Since the two
>> data sets have significant space between them do you want to fill in that
>> space with extra cells or do you want to translate one of the data sets to
>> get rid of the space between?  If you want to add in cells then it might be
>> easiest to merge the data sets (GroupDataSet filter and then MergeBlocks
>> filter like below) and then use the vtkDelauney3D filter to create a new
>> grid that keeps the point data.
>>
>> If you want to translate one of the grids to get rid of the space between
>> them you'll need to use something like the CleanToGrid filter to get an
>> unstructured grid from your rectilinear grid.  Then  you can use the
>> Transform filter to move it to the proper position (in this case
>> -0.10000001489999999 in the z direction for test.2.nc since the
>> vtkCleantoGridFilter is quite finicky).  Then use GroupDataSets filter to
>> merge the data sets into a multiblock (right click on the GroupDataSets
>> filter to select one of the test.*.nc files and the the Transform filter).
>> Finally, you'll need to use the vtkCleantoGrid filter again to get the
>> proper connectivity.  You'll want to check what it does with the point data
>> at the merged points though.
>>
>> If neither of these is what you want then you'll need to be very
>> descriptive of what  you hope to accomplish in order for me to help you any
>> more.
>>
>> Andy
>>
>>
>> On Thu, Jan 28, 2010 at 5:51 AM, Julien Bodart <julien.bodart at gmail.com>wrote:
>>
>>> Andy,
>>>
>>> Thanks for your help.
>>> I have attached two simple files I am trying to merge. But looking at the
>>> problem, I am afraid you will tell me that there is no solution.
>>> As you will see there is no duplicate points,  thus Paraview cannot guess
>>> it.
>>> What is the best way to make them paraview-compliant? Add duplicate
>>> cells?
>>> Thanks.
>>>
>>> Julien
>>>
>>> 2010/1/27 Andy Bauer <andy.bauer at kitware.com>
>>>
>>>> To be clear, I meant first use the group data set filter or merge block
>>>> filter to put all of the cells in the same data set and then use the clean
>>>> to grid filter to get rid of duplicate points.  Points won't get merged if
>>>> they are not within a certain distance from each other.  So again the real
>>>> problem isn't that all of the cells aren't in the same data set but the fact
>>>> that the grid connectivity is not correct.  If you are doing this in
>>>> parallel this can also have an affect on appearance due to not having the
>>>> correct connectivity between cells on different partitions/processors.
>>>>
>>>> If you can give me a more detailed description of the problem and send
>>>> the grid I can take a closer look at it.
>>>>
>>>> Andy
>>>>
>>>>
>>>> On Wed, Jan 27, 2010 at 10:04 AM, Julien Bodart <
>>>> julien.bodart at gmail.com> wrote:
>>>>
>>>>> Well, actually I think I tried all the filters, included the clean to
>>>>> grid one.
>>>>> In my case there is actually no duplicate point between files:
>>>>>
>>>>> for example:
>>>>>
>>>>> file-1, z-coord: 0.0,0.1,0.2
>>>>> file-2, z-coord: 0.3,0.4,0.5
>>>>>
>>>>> And the grid is structured.
>>>>>
>>>>> Maybe in this case there is no way to make a single dataset?
>>>>>
>>>>>
>>>>>
>>>>> 2010/1/27 Andy Bauer <andy.bauer at kitware.com>
>>>>>
>>>>>> Try using the clean to grid filter.  Although all of the cells are in
>>>>>> the same data set (probably an unstructured grid), the filter does not
>>>>>> realize that there are duplicate points and because of this the grid
>>>>>> connectivity is probably not what you're expecting.
>>>>>>
>>>>>> Andy
>>>>>>
>>>>>> On Wed, Jan 27, 2010 at 8:03 AM, Julien Bodart <
>>>>>> julien.bodart at gmail.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I am new to Paraview, thanks to the new Netcdf Reader of 3.6 release.
>>>>>>> (Thank you very much for that)
>>>>>>> Therefore my problem is probably really trivial but I can't get it
>>>>>>> resolved...
>>>>>>> I am reading 2 or more netcdf file describing several part of the
>>>>>>> grid.
>>>>>>> The complete domain is a cube(rectilinear grid), sliced in a given
>>>>>>> number of files. There is no ghost cells so there is no obvious match
>>>>>>> between files.
>>>>>>> When I try to merge the different block (using the group dataset
>>>>>>> filter or merge block), I end up with a split domain, leading to a visual
>>>>>>> gap between each sub-domain, whether I am plotting contour , vertical plane
>>>>>>> or whatever.
>>>>>>> Is there a way to "really" merge those subdomain to end up with a
>>>>>>> single domain.
>>>>>>>
>>>>>>> Thanks in advance!
>>>>>>>
>>>>>>> Julien
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Powered by www.kitware.com
>>>>>>>
>>>>>>> Visit other Kitware open-source projects at
>>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>>
>>>>>>> Please keep messages on-topic and check the ParaView Wiki at:
>>>>>>> http://paraview.org/Wiki/ParaView
>>>>>>>
>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>>> http://www.paraview.org/mailman/listinfo/paraview
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100128/9cc6a7bf/attachment.htm>


More information about the ParaView mailing list