<div dir="ltr">

<p class="MsoNormal">Dear vtkusers,</p><p class="MsoNormal"><br></p><p class="MsoNormal">I am trying to develop an efficient method for writing different vtk
unstructured grid datasets which change with time in a single vtk file. 

</p><p class="MsoNormal"><br></p><p class="MsoNormal">In particular, we have an in-house Boundary Element solver and we would like to save element and node information (unstructured grid DataSets) in a single file. Then, by using vtk methods we would like to visualise the results.</p><p class="MsoNormal"><br></p><p class="MsoNormal">The main question I would like to ask is whether any of you have developed similar vtk applications and what would be the optimal way. I found that multiblocks can be saved in either exodus or vtm file. What is the difference? Is there any other way?<br></p><p class="MsoNormal"><br></p><p class="MsoNormal">How could I save different time steps of these multiblocks? Is there any simple example of creating such a file? Moreover, I found that vtkHierrarchicalBoxDataSet is for Adaptive Meshing. Is there any example? <br></p><p class="MsoNormal"><br></p><p class="MsoNormal">Lastly, how I could extract a specific block from a multiblock by giving its name. In the following code I have managed to extract a certain block by giving its index only. Is it possible to call a block from each name?<br></p><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><p class="MsoNormal"><br></p><p class="MsoNormal">       private void MultiBlockDisplay()<br>        {<br>            string path;<br>            string domainName;<br>            string fileName;<br><br>            vtkRenderer ren = vtkRenderer.New();<br>            ren.SetBackground(0.2, 0.3, 0.4);<br>            vtkRenderWindow renWin = renderWindowControl1.RenderWindow;<br>            renWin.AddRenderer(ren);<br>            vtkRenderWindowInteractor iren = vtkRenderWindowInteractor.New();<br>            iren.SetRenderWindow(renWin);<br><br>            uint number = 2;<br>            vtkMultiBlockDataSet mbset = vtkMultiBlockDataSet.New();<br>            mbset.SetNumberOfBlocks(number);<br><br>            for (uint i = 0; i < number; i++)<br>            {<br>                vtkUnstructuredGridReader reader = vtkUnstructuredGridReader.New();<br><br>                path = @"C:\\A_directory\\";<br>                domainName = "MultiBlock_" + i.ToString();<br>                fileName = path + domainName + ".vtk";<br><br>                reader.SetFileName(fileName);<br>                reader.SetReadAllScalars(1);<br>                reader.SetReadAllVectors(1);<br>                reader.Update();<br><br>                mbset.SetBlock(i, reader.GetOutput());<br><br>                mbset.GetMetaData(i).Set(vtkCompositeDataSet.NAME(), domainName);<br><br>                //The following bit prints the name for each block<br>                string nameDOM = mbset.GetMetaData(i).Get(vtkCompositeDataSet.NAME());<br>                Debug.Print(nameDOM);<br>                <br>            }<br><br>            vtkUnstructuredGrid ug = vtkUnstructuredGrid.SafeDownCast(mbset.GetBlock(1));<br><br>            vtkDataSetMapper mapper = vtkDataSetMapper.New();<br>            mapper.SetInput(ug);<br><br>            vtkActor actor = vtkActor.New();<br>            actor.SetMapper(mapper);<br><span style="background-color:rgb(0,0,0)"><span style=""></span></span><br>            ren.AddActor(actor);<br><br>            ren.SetBackground(0.2, 0.3, 0.4);<br><br>        }<br></p></blockquote>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Many thanks in advance.</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Kindest regards,</p><p class="MsoNormal"><br></p><p class="MsoNormal">Giorgos<br></p>

</div>