<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Dear Andy Bauer,</p>
    <p>For the color map issue, I think ParaView 5.4.1 resolved it. But,
      I could not figure out annotate time filter issue. may be it is
      just simple problem but I am not sure. Coprocess routine is as
      follows and python script is attached.</p>
    <p>It would be appreciated if you make some advice.<br>
    </p>
    <p><br>
    </p>
    <p>void CoProcess(Foam::fvMesh& mesh, Foam::Time& runTime)<br>
      {<br>
             vtkNew<vtkCPDataDescription> dataDescription;<br>
             dataDescription->AddInput("input");<br>
             const double time = runTime.value();<br>
             const unsigned int timeStep = runTime.timeIndex();<br>
             dataDescription->SetTimeData(time, timeStep);<br>
      <br>
             if (runTime.end())<br>
             {<br>
                 // assume that we want to all the pipelines to execute<br>
                 // if it is the last time step<br>
                 dataDescription->ForceOutputOn();<br>
             }<br>
             if
      (Processor->RequestDataDescription(dataDescription.GetPointer())
      != 0)<br>
             {<br>
                 Foam::polyMesh::readUpdateState meshState =
      mesh.readUpdate();<br>
      <br>
                 if(meshState != Foam::polyMesh::UNCHANGED)<br>
                 {<br>
                     // mesh moved? or mesh topology changed?<br>
                     BuildVTKGrid(mesh, true);<br>
                 }<br>
                 UpdateVTKAttributes(mesh);<br>
                
      dataDescription->GetInputDescriptionByName("input")-><br>
                     SetGrid(multiBlockDataSet);<br>
                 Processor->CoProcess(dataDescription.GetPointer());<br>
             }<br>
      }</p>
    <p>Regards.</p>
    <p>SeongMo<br>
    </p>
    <pre class="moz-signature" cols="72">SeongMo Yeon, Ph.D, Senior Engineer
Offshore Hydrodynamics Research
SAMSUNG HEAVY INDUSTRIES CO., LTD.
Central Research Institute 
E-mail : <a class="moz-txt-link-abbreviated" href="mailto:seongmo.yeon@gmail.com">seongmo.yeon@gmail.com</a>
Tel :
--------------------------------------------------------
Fluctuat nec mergitur </pre>
    <div class="moz-cite-prefix">On 01/25/2018 06:56 AM, Andy Bauer
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMaOp+FqVGEEEwQxywUDqD0iR+m0HJKUokedO3vLuzW3BAKNfQ@mail.gmail.com">
      <div dir="ltr">
        <div>
          <div>
            <div>Hi Seongmo,<br>
              <br>
            </div>
            Please keep the conversations on the mailing list so that
            anyone can follow along or participate. Also, these types of
            things often get lost in my inbox when they don't make it
            back to the ParaView mailing list.<br>
            <br>
          </div>
          What version of ParaView Catalyst are you using? I think the
          annotate time filter should work with Catalyst but I haven't
          verified that. I vaguely remember others using that filter
          with Catalyst though. Also, I think the colormap bug was
          fixed. If you have a way of sharing a sample that demonstrates
          either of those bugs I can try taking a look at the issue.<br>
          <br>
        </div>
        <div>Best,<br>
        </div>
        <div>Andy <br>
        </div>
        <div>
          <div>
            <div class="gmail_extra"><br>
              <div class="gmail_quote">On Thu, Jan 18, 2018 at 6:40 PM,
                Seong Mo Yeon <span dir="ltr"><<a
                    href="mailto:seongmo.yeon@gmail.com" target="_blank"
                    moz-do-not-send="true">seongmo.yeon@gmail.com</a>></span>
                wrote:<br>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  <div>
                    <div name="messageBodySection">Dear Andy Bauer<br>
                      <br>
                      I have a quick question.<br>
                      Is it possible to have annotate time filter
                      processed in catalyst adaptor? Current my code
                      cannot that filter.<br>
                      <br>
                      BTW, image extracted from catalyst looks different
                      from render view of paraview at the time of
                      writing a script. e.g., pressure colormap legend
                      is missing.<br>
                      <br>
                      Regards<br>
                      Seongmo</div>
                    <div name="messageReplySection"><br>
                      On 2018년 1월 18일 AM 1:17 +0900, Andy Bauer <<a
                        href="mailto:andy.bauer@kitware.com"
                        target="_blank" moz-do-not-send="true">andy.bauer@kitware.com</a>>,
                      wrote:<br>
                      <blockquote type="cite">
                        <div dir="ltr">
                          <div>Hi,<br>
                            <br>
                          </div>
                          My guess is that the TimeStep isn't getting
                          set properly in the adaptor (though it looks
                          like it should be in
                          "dataDescription->SetTimeData(<wbr>runTime.value(),
                          runTime.deltaTValue());"). My suggestion would
                          be to add in the following to either the
                          RequestDataDescription() or DoCoProcessing()
                          methods in the python script to see what
                          Catalyst thinks the time step is:<br>
                              print("In script2.py, the data time step
                          is ", datadescription.GetTimeStep())<br>
                          <br>
                        </div>
                        <div class="gmail_extra"><br>
                          <div class="gmail_quote">On Wed, Jan 17, 2018
                            at 9:57 AM, SeongMo <span dir="ltr"><<a
                                href="mailto:seongmo.yeon@gmail.com"
                                target="_blank" moz-do-not-send="true">seongmo.yeon@gmail.com</a>></span>
                            wrote:<br>
                            <blockquote class="gmail_quote"
                              style="margin:0 0 0 .8ex;border-left:1px
                              #ccc solid;padding-left:1ex">
                              <div class="m_-8627969882828805903HOEnZb">
                                <div class="m_-8627969882828805903h5">Hi,<br>
                                  <br>
                                  I wrote a OpenFOAM adaptor for
                                  Catalyst.<br>
                                  <br>
                                  In the ParaView, the connection is
                                  made good and shows filtered flow
                                  field as written in the python script.<br>
                                  <br>
                                  However, filename_%t and image_%t is
                                  not expanded as time marching but just
                                  write filename_0 and image_0.png.<br>
                                  <br>
                                  As far as I know, %t should be
                                  replaced with current time as given in
                                  dataDescription->SetTimeData.<br>
                                  <br>
                                  Any help would be appreciated.<br>
                                  <br>
                                  <br>
                                  FYI, python script is attached and
                                  snippet of my OpenFOAM Adaptor code
                                  for Catalyst is as follows:<br>
                                  <br>
                                  // icoFoam.C<br>
                                  <br>
                                  #ifdef USE_CATALYST<br>
                                      Foam::HashTable<string>
                                  options = args.options();<br>
                                      IStringStream
                                  is(options["scriptList"]);<br>
                                      wordList scriptList =
                                  readList<word>(is);<br>
                                      OFAdaptor::Initialize(scriptLi<wbr>st,
                                  mesh);<br>
                                  #endif<br>
                                      while (runTime.loop())<br>
                                      {<br>
                                          runTime.write();<br>
                                  #ifdef USE_CATALYST<br>
                                          OFAdaptor::CoProcess(mesh,
                                  runTime);<br>
                                  #endif<br>
                                      }<br>
                                  #ifdef USE_CATALYST<br>
                                      OFAdaptor::Finalize();<br>
                                  #endif<br>
                                  <br>
                                  <br>
                                  // OFAdaptor.C<br>
                                  <br>
                                  void CoProcess(Foam::fvMesh& mesh,
                                  Foam::Time& runTime)<br>
                                  {<br>
                                        
                                  vtkNew<vtkCPDataDescription>
                                  dataDescription;<br>
                                        
                                  dataDescription->AddInput("inp<wbr>ut");<br>
                                        
                                  dataDescription->SetTimeData(r<wbr>unTime.value(),
                                  runTime.deltaTValue());<br>
                                         if (runTime.end())<br>
                                         {<br>
                                             // assume that we want to
                                  all the pipelines to execute<br>
                                             // if it is the last time
                                  step<br>
                                            
                                  dataDescription->ForceOutputOn<wbr>();<br>
                                         }<br>
                                         if
                                  (Processor->RequestDataDescrip<wbr>tion(dataDescription.GetPointe<wbr>r())
                                  != 0)<br>
                                         {<br>
                                            
                                  Foam::polyMesh::readUpdateStat<wbr>e
                                  meshState = mesh.readUpdate();<br>
                                  <br>
                                             if(meshState !=
                                  Foam::polyMesh::UNCHANGED)<br>
                                             {<br>
                                                 BuildVTKGrid(mesh);<br>
                                             }<br>
                                             UpdateVTKAttributes(mesh);<br>
                                  dataDescription->GetInputDescr<wbr>iptionByName("input")->SetGrid<wbr>(multiBlockDataSet);<br>
                                            
                                  Processor->CoProcess(dataDescr<wbr>iption.GetPointer());<br>
                                         }<br>
                                  }<br>
                                  <br>
                                  <br>
                                  --<br>
                                  SeongMo Yeon, Ph.D, Senior Engineer<br>
                                  Offshore Hydrodynamics Research<br>
                                  SAMSUNG HEAVY INDUSTRIES CO., LTD.<br>
                                  Central Research Institute<br>
                                  E-mail : <a
                                    href="mailto:seongmo.yeon@gmail.com"
                                    target="_blank"
                                    moz-do-not-send="true">seongmo.yeon@gmail.com</a><br>
                                  Tel :<br>
                                  ------------------------------<wbr>--------------------------<br>
                                  Fluctuat nec mergitur<br>
                                  <br>
                                </div>
                              </div>
                              <br>
                              ______________________________<wbr>_________________<br>
                              Powered by <a
                                href="http://www.kitware.com"
                                rel="noreferrer" target="_blank"
                                moz-do-not-send="true">www.kitware.com</a><br>
                              <br>
                              Visit other Kitware open-source projects
                              at <a
                                href="http://www.kitware.com/opensource/opensource.html"
                                rel="noreferrer" target="_blank"
                                moz-do-not-send="true">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
                              <br>
                              Please keep messages on-topic and check
                              the ParaView Wiki at: <a
                                href="http://paraview.org/Wiki/ParaView"
                                rel="noreferrer" target="_blank"
                                moz-do-not-send="true">http://paraview.org/Wiki/ParaV<wbr>iew</a><br>
                              <br>
                              Search the list archives at: <a
                                href="http://markmail.org/search/?q=ParaView"
                                rel="noreferrer" target="_blank"
                                moz-do-not-send="true">http://markmail.org/search/?q=<wbr>ParaView</a><br>
                              <br>
                              Follow this link to subscribe/unsubscribe:<br>
                              <a
                                href="https://paraview.org/mailman/listinfo/paraview"
                                rel="noreferrer" target="_blank"
                                moz-do-not-send="true">https://paraview.org/mailman/l<wbr>istinfo/paraview</a><br>
                              <br>
                            </blockquote>
                          </div>
                          <br>
                        </div>
                      </blockquote>
                    </div>
                  </div>
                </blockquote>
              </div>
              <br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>