Dear David,<br>
<br>
Because of forgetting to comment out some lines in an other part of the code, the error message appeared as shown in the previous mail. <br>Sorry 
for the false report. <br>
Now I am able to access data in Lsdyna files:<br>
<br>
<div style="margin-left: 40px;">        //string 
dir=&quot;/home/viet/vtk_test/3dplot/&quot;;<br>
        //string dir=&quot;/home/viet/vtk_test/airbag/&quot;;<br>
        //string dir=&quot;/home/viet/vtk_test/billet/&quot;;<br>
        string dir=&quot;/home/viet/vtk_test/taylor/&quot;;<br>
        plLD-&gt;SetDatabaseDirectory(dir.c_str());<br>
        plLD-&gt;Update();<br>
  <br>
        int dbValid=plLD-&gt;IsDatabaseValid();<br>
        cout&lt;&lt;&quot;Is database valid = &quot;&lt;&lt;dbValid&lt;&lt;endl;<br>
        char * title = plLD-&gt;GetTitle();<br>
        cout&lt;&lt;&quot;Title = &quot;&lt;&lt;title&lt;&lt;endl;<br>
        int cellArrNum = plLD-&gt;GetNumberOfCellArrays(4);<br>
        cout&lt;&lt;&quot;Number of cell arrays = 
&quot;&lt;&lt;cellArrNum&lt;&lt;endl;<br>
        int nodeNum=plLD-&gt;GetNumberOfNodes( );<br>
        cout&lt;&lt;&quot;Number of nodes = &quot;&lt;&lt;nodeNum&lt;&lt;endl;<br>
        plLD-&gt;Dump(cout);<br>
</div>
<br>
By reference to &quot;MultiBlock.cxx&quot; in &quot;VTK/Examples&quot;, I made a
 code for rendering as follows:<br>
<br>
<div style="margin-left: 40px;">        vtkMultiBlockDataSet* mbds = 
plLD-&gt;GetOutput();<br>
        vtkStructuredGridOutlineFilter* of = 
vtkStructuredGridOutlineFilter::New();<br>
        of-&gt;SetInput(mbds);<br>
        // geometry filter<br>
        vtkCompositeDataGeometryFilter* geom1 = 
vtkCompositeDataGeometryFilter::New();<br>
        geom1-&gt;SetInputConnection(0, of-&gt;GetOutputPort(0));<br>
        // Rendering objects<br>
        vtkPolyDataMapper* geoMapper = vtkPolyDataMapper::New();<br>
        geoMapper-&gt;SetInputConnection(0, geom1-&gt;GetOutputPort(0));<br>
        vtkActor* geoActor = vtkActor::New();<br>
        geoActor-&gt;SetMapper(geoMapper);<br>
        geoActor-&gt;GetProperty()-&gt;SetColor(0, 0, 0);<br>
        ren-&gt;AddActor(geoActor);<br>
</div>
<br>
I&#39;ve got a error message when compiling but still know no way to fix it.<br>
<br>
<div style="margin-left: 40px;">   <span style="color: rgb(255, 0, 0);"> error: no matching function for call
 to 
&#39;vtkStructuredGridOutlineFilter::SetInput(vtkMultiBlockDataSet*&amp;)&#39;</span><br>
</div>

<br>
Could you please be a little bit more specific on the matter of 
rendering a vtkMultiBlockDataSet object by giving some examples or some 
reference links?<br><br>Thank you in advance and best regards,<br><br>Viet.<br><font color="#888888"><br></font><br><div class="gmail_quote">2010/2/20 Viet H.Q.H <span dir="ltr">&lt;<a href="mailto:viet@bakuhatsu.jp">viet@bakuhatsu.jp</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Dear David,<br><br>Thank you very much for your quick responding.<br><br>As you had explained, I ran the following code for directories containing d3plot files generated from three examples at the site: <a href="http://www.dynaexamples.com" target="_blank">http://www.dynaexamples.com</a><br>

<br><div style="margin-left: 40px;">   <span style="color: rgb(0, 0, 153);"> vtkLSDynaReader *plLD=vtkLSDynaReader::New( );</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">    //string dir=&quot;/home/viet/vtk_test/airbag/&quot;;</span><br style="color: rgb(0, 0, 153);">

<span style="color: rgb(0, 0, 153);">    //string dir=&quot;/home/viet/vtk_test/taylor/&quot;;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">    //string dir=&quot;/home/viet/vtk_test/billet/&quot;;</span><br style="color: rgb(0, 0, 153);">

<span style="color: rgb(0, 0, 153);">    //plLD-&gt;SetDatabaseDirectory(dir.c_str());</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">    plLD-&gt;SetDatabaseDirectory(&quot;/home/viet/vtk_test/taylor/&quot;);</span><br style="color: rgb(0, 0, 153);">

<span style="color: rgb(0, 0, 153);">    plLD-&gt;Update();</span><br></div><br>I get the following error:<br><br><div style="margin-left: 40px;"> <span style="color: rgb(255, 0, 0);">   ERROR: In /home/viet/VTK/IO/vtkPLOT3DReader.cxx, line 126</span><br style="color: rgb(255, 0, 0);">

<span style="color: rgb(255, 0, 0);">    vtkPLOT3DReader (0x194f5500): Must specify geometry file</span><br></div><br>How can I specify the geometry file? <br>The directory &quot;taylor&quot; is the directory containing a d3plot file generated from the file taylor1.k downloaded at the site: <a href="http://www.dynaexamples.com/sph/bar-iv" target="_blank">http://www.dynaexamples.com/sph/bar-iv</a>.<br>

<br><div style="margin-left: 40px;"><span style="color: rgb(0, 0, 153);"># ls taylor</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">adptmp      d3dump01.0000  d3dump01.0003  d3plot    glstat      messag0001  mf         scr0000   scr0001h  scr0003     taylor1.k</span><br style="color: rgb(0, 0, 153);">

<span style="color: rgb(0, 0, 153);">bg_switch   d3dump01.0001  d3full01       d3plot01  log.txt     messag0002  run.sh     scr0000h  scr0002   scr0003h</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">binout0000  d3dump01.0002  d3hsp          dyna.str  messag0000  messag0003  run.sh.bk  scr0001   scr0002h  status.out</span><br>

</div><br>I also got the same error message for the directories <a href="http://www.dynaexamples.com/examples-manual/misc/airbag" target="_blank">&quot;airbag&quot;</a> and <a href="http://www.dynaexamples.com/examples-manual/control/timestep" target="_blank">&quot;billet&quot;</a>.<br>

Thank you in advance and best regards,<br><font color="#888888"><br>Viet.</font><div><div></div><div class="h5"><br><br><br><div class="gmail_quote">On Sat, Feb 20, 2010 at 9:49 AM, David Thompson <span dir="ltr">&lt;<a href="mailto:dcthomp@sandia.gov" target="_blank">dcthomp@sandia.gov</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">


I am a beginner of using VTK. I was trying to use the vtkLSDynaReader class to handle FEM data in LSDYNA database but found no program examples to start.<br>
<br>
I checked some functions of vtkLSDynaReader class and found that they didn&#39;t function well.<br>
<br>
For instance, the function CanReadFile always return the value of 1 regarless of the exitence of files.<br>
</blockquote>
<br></div>
Unlike many file formats, LS-Dyna stores results in many files located in a single directory. These files have canonical names, not user-specified names. So CanReadFile attempts to determine the directory containing whatever filename you pass it and looks for these canonically-named files (d3plot, for instance) in that directory. Therefore, instead of using SetFileName() it is recommended that you use SetDatabaseDirectory() to the name of a directory containing d3plot files.<br>


<br>
If you have a specific circumstance where this is failing, some more information would help. For instance, does d3plot exist in that directory? Does it work if you pass CanReadFile an absolute path instead of a relative one like the example you included?<div>

<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Are there any starting points to use the VTK to visualize FEM data in LSDYNA database?<br>
</blockquote>
<br></div>
It should be as simple as<br>
  vtkLSDynaReader* rdr = vtkLSDynaReader::New();<br>
  rdr-&gt;SetDatabaseDirectory( &quot;/path/to/output&quot; );<br>
  rdr-&gt;Update();<br>
After calling Update(), GetOutput() should return a pointer to a vtkMultiBlockDataSet that you can render.<br>
<br>
I have tested the reader with LS-Dyna output generated from many examples at http://www.dynaexamples.como/ including<br>
<br>
<a href="http://www.dynaexamples.com/examples-manual/misc/airbag" target="_blank">http://www.dynaexamples.com/examples-manual/misc/airbag</a><br>
<a href="http://www.dynaexamples.com/examples-manual/control/timestep" target="_blank">http://www.dynaexamples.com/examples-manual/control/timestep</a><br>
<a href="http://www.dynaexamples.com/sph/bar-iv" target="_blank">http://www.dynaexamples.com/sph/bar-iv</a><br>
<br>
One important thing to note is that the reader only parses LS-Dyna *output*, not LS-Dyna input decks.<br><font color="#888888">
<br>
        David<br>
<br>
<br>
</font></blockquote></div><br><br>
</div></div></blockquote></div><br><br>