<div dir="ltr"><span style="font-size:14px">hi, all</span><div style="font-size:14px"><br></div><div style="font-size:14px">In Catalyst example "Fortran90FullExample" -> "FECxxAdaptor.cxx"->"<span style="color:rgb(0,0,0);font-family:menlo;font-size:11px">createcpi<wbr>magedata_</span>", the grid is new and has no coordinates. So, how to transfer the simulation grid coordinates to this <span style="color:rgb(0,0,0);font-family:menlo;font-size:11px">vtkImageData </span>grid?</div><div style="font-size:14px"><br></div><div style="font-size:14px">Thank you!</div><div style="font-size:14px"><br></div><div style="font-size:14px"><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">extern</span><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(209,47,27)">"C"</span><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">void</span><span style="font-variant-ligatures:no-common-ligatures"> createcpimagedata_(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">int</span><span style="font-variant-ligatures:no-common-ligatures">* nxstart, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">int</span><span style="font-variant-ligatures:no-common-ligatures">* nxend, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">int</span><span style="font-variant-ligatures:no-common-ligatures">* nx,</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">                                   </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">int</span><span style="font-variant-ligatures:no-common-ligatures">* ny, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">int</span><span style="font-variant-ligatures:no-common-ligatures">* nz)</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">{</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">if</span><span style="font-variant-ligatures:no-common-ligatures"> (!vtkCPPythonAdaptorAPI::<wbr>GetCoProcessorData())</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">    {</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(209,47,27)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">    vtkGenericWarningMacro(</span><span style="font-variant-ligatures:no-common-ligatures">"Unable to access CoProcessorData."</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">);</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(186,45,162)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">    </span><span style="font-variant-ligatures:no-common-ligatures">return</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">;</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">    }</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,132,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">  </span><span style="font-variant-ligatures:no-common-ligatures">// The simulation grid is a 3-dimensional topologically and geometrically</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,132,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">  </span><span style="font-variant-ligatures:no-common-ligatures">// regular grid. In VTK/ParaView, this is considered an image data set.</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  vtkSmartPointer<vtkImageData> grid = vtkSmartPointer<vtkImageData>:<wbr>:New();</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  grid->SetExtent(*nxstart-</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">1</span><span style="font-variant-ligatures:no-common-ligatures">, *nxend-</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">1</span><span style="font-variant-ligatures:no-common-ligatures">, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">0</span><span style="font-variant-ligatures:no-common-ligatures">, *ny-</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">1</span><span style="font-variant-ligatures:no-common-ligatures">, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">0</span><span style="font-variant-ligatures:no-common-ligatures">, *nz-</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">1</span><span style="font-variant-ligatures:no-common-ligatures">);</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,132,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">  </span><span style="font-variant-ligatures:no-common-ligatures">// Name should be consistent between here, Fortran and Python client script.</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  vtkCPPythonAdaptorAPI::<wbr>GetCoProcessorData()-><wbr>GetInputDescriptionByName(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(209,47,27)">"<wbr>input"</span><span style="font-variant-ligatures:no-common-ligatures">)->SetGrid(grid);</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  vtkCPPythonAdaptorAPI::<wbr>GetCoProcessorData()-><wbr>GetInputDescriptionByName(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(209,47,27)">"<wbr>input"</span><span style="font-variant-ligatures:no-common-ligatures">)->SetWholeExtent(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">0</span><span style="font-variant-ligatures:no-common-ligatures">, *nx-</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">1</span><span style="font-variant-ligatures:no-common-ligatures">, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">0</span><span style="font-variant-ligatures:no-common-ligatures">, *ny-</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">1</span><span style="font-variant-ligatures:no-common-ligatures">, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">0</span><span style="font-variant-ligatures:no-common-ligatures">, *nz-</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">1</span><span style="font-variant-ligatures:no-common-ligatures">);</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">}</span></p></div><div><br></div>-- <br><div class="gmail_signature"><div><font face="'Times New Roman'" size="3"><span style="font-size:12px"><span style="font-size:small;font-family:arial">
<div><span style="font-size:medium;font-family:'times new roman'"><span style="font-size:12px">中国空气动力研究与发展中心 <span style="color:rgb(51,51,51);line-height:21px;font-family:arial,helvetica,sans-serif">计算空气动力研究所</span></span></span></div>
<div>Blog: <a href="http://blog.donews.com/frank777" target="_blank">http://blog.donews.com/frank777</a>  <br>MSN: <a href="mailto:frank1985876@hotmail.com" target="_blank">frank1985876@hotmail.com</a></div></span></span></font></div></div>
</div>