<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi, Andy Bauer,</p>
<p><br>
</p>
<p>My script should show streamline with time of cavity tutorial of
OpenFOAM as attached.</p>
<p>However, my script makes a error which does not the case without
annotate time filter.</p>
<p>I checked my script with your script and found the following
difference.</p>
<p><br>
</p>
<p>My script:</p>
<p>annotateTime1Display = Show(annotateTime1, renderView1)</p>
<p>SetActiveSource(parallelMultiBlockDataSetWriter1)</p>
<p>return PipeLine()</p>
<p><br>
</p>
<p>Andy Bauer's script:<br>
</p>
<p>annotateTime1Display = Show(annotateTime1, renderView1)</p>
<p>annotateTime1Display.FontFile = ''</p>
<p>SetActiveSource(annotateTime1)</p>
<p>return PipeLine()<br>
</p>
<p><br>
</p>
<p>I guess this difference is related to my error but my question is
how can I get my field with time plotted without setting
annotateTime1 as active source.<br>
</p>
<p><br>
</p>
<p>Below is the error message, FYI.</p>
<p><br>
</p>
<p>Starting time loop<br>
<br>
   Original cells:400 points:882  Additional cells:0 additional
points:0<br>
<br>
Building InternalMesh<br>
Building BoundaryMesh<br>
Start Catalyst<br>
Time = 0.005<br>
<br>
Courant Number mean: 0 max: 0<br>
smoothSolver:Â Solving for Ux, Initial residual = 1, Final
residual = 8.90511e-06, No Iterations 19<br>
smoothSolver:Â Solving for Uy, Initial residual = 0, Final
residual = 0, No Iterations 0<br>
DICPCG:Â Solving for p, Initial residual = 1, Final residual =
0.0492854, No Iterations 12<br>
time step continuity errors : sum local = 0.000466513, global =
-1.79995e-19, cumulative = -1.79995e-19<br>
DICPCG:Â Solving for p, Initial residual = 0.590864, Final
residual = 2.65225e-07, No Iterations 35<br>
time step continuity errors : sum local = 2.74685e-09, global =
-2.6445e-19, cumulative = -4.44444e-19<br>
#0Â Foam::error::printStack(Foam::Ostream&) at ??:?<br>
#1Â Foam::sigFpe::sigHandler(int) at ??:?<br>
#2Â ? in "/usr/lib/libc.so.6"<br>
#3Â vtkSMBoundsDomain::SetDomainValues(double*) in
"/home/user1/OpenFOAM/ThirdParty-5.x/platforms/linux64Gcc/ParaView-5.4.1/lib/paraview-5.4/libvtkPVServerManagerCore-pv5.4.so.1"<br>
#4Â vtkSMBoundsDomain::Update(vtkSMProperty*) in
"/home/user1/OpenFOAM/ThirdParty-5.x/platforms/linux64Gcc/ParaView-5.4.1/lib/paraview-5.4/libvtkPVServerManagerCore-pv5.4.so.1"<br>
#5Â vtkSMProperty::UpdateDomains() in
"/home/user1/OpenFOAM/ThirdParty-5.x/platforms/linux64Gcc/ParaView-5.4.1/lib/paraview-5.4/libvtkPVServerManagerCore-pv5.4.so.1"<br>
#6Â
vtkObject::vtkClassMemberCallback<vtkSMProperty>::operator()(vtkObject*,
unsigned long, void*) in
"/home/user1/OpenFOAM/ThirdParty-5.x/platforms/linux64Gcc/ParaView-5.4.1/lib/paraview-5.4/libvtkPVServerManagerCore-pv5.4.so.1"<br>
#7Â ? in
"/home/user1/OpenFOAM/ThirdParty-5.x/platforms/linux64Gcc/ParaView-5.4.1/lib/paraview-5.4/libvtkCommonCore-pv5.4.so.1"<br>
#8Â vtkSMProxyProperty::Copy(vtkSMProperty*) in
"/home/user1/OpenFOAM/ThirdParty-5.x/platforms/linux64Gcc/ParaView-5.4.1/lib/paraview-5.4/libvtkPVServerManagerCore-pv5.4.so.1"<br>
#9Â ? in
"/home/user1/OpenFOAM/ThirdParty-5.x/platforms/linux64Gcc/ParaView-5.4.1/lib/paraview-5.4/libvtkCommonCore-pv5.4.so.1"<br>
#10Â vtkSMPropertyHelper::Set(unsigned int, vtkSMProxy*, unsigned
int) in
"/home/user1/OpenFOAM/ThirdParty-5.x/platforms/linux64Gcc/ParaView-5.4.1/lib/paraview-5.4/libvtkPVServerManagerCore-pv5.4.so.1"<br>
#11Â
vtkSMRenderViewProxy::GetRepresentationType(vtkSMSourceProxy*,
int) in
"/home/user1/OpenFOAM/ThirdParty-5.x/platforms/linux64Gcc/ParaView-5.4.1/lib/paraview-5.4/libvtkPVServerManagerRendering-pv5.4.so.1"<br>
#12Â vtkSMViewProxy::CreateDefaultRepresentation(vtkSMProxy*, int)
in
"/home/user1/OpenFOAM/ThirdParty-5.x/platforms/linux64Gcc/ParaView-5.4.1/lib/paraview-5.4/libvtkPVServerManagerRendering-pv5.4.so.1"<br>
#13Â
vtkSMParaViewPipelineControllerWithRendering::Show(vtkSMSourceProxy*,
int, vtkSMViewProxy*) in
"/home/user1/OpenFOAM/ThirdParty-5.x/platforms/linux64Gcc/ParaView-5.4.1/lib/paraview-5.4/libvtkPVServerManagerRendering-pv5.4.so.1"<br>
#14Â ? in
"/home/user1/OpenFOAM/ThirdParty-5.x/build/linux64Gcc/ParaView-5.4.1/lib/libvtkPVServerManagerRenderingPython27D-pv5.4.so.1"<br>
#15Â PyEval_EvalFrameEx in "/usr/lib/libpython2.7.so.1.0"<br>
#16Â PyEval_EvalCodeEx in "/usr/lib/libpython2.7.so.1.0"<br>
#17Â PyEval_EvalFrameEx in "/usr/lib/libpython2.7.so.1.0"<br>
#18Â PyEval_EvalCodeEx in "/usr/lib/libpython2.7.so.1.0"<br>
#19Â PyEval_EvalFrameEx in "/usr/lib/libpython2.7.so.1.0"<br>
#20Â PyEval_EvalCodeEx in "/usr/lib/libpython2.7.so.1.0"<br>
#21Â PyEval_EvalFrameEx in "/usr/lib/libpython2.7.so.1.0"<br>
#22Â PyEval_EvalCodeEx in "/usr/lib/libpython2.7.so.1.0"<br>
#23Â PyEval_EvalFrameEx in "/usr/lib/libpython2.7.so.1.0"<br>
#24Â PyEval_EvalCodeEx in "/usr/lib/libpython2.7.so.1.0"<br>
#25Â PyEval_EvalFrameEx in "/usr/lib/libpython2.7.so.1.0"<br>
#26Â PyEval_EvalCodeEx in "/usr/lib/libpython2.7.so.1.0"<br>
#27Â PyEval_EvalFrameEx in "/usr/lib/libpython2.7.so.1.0"<br>
#28Â PyEval_EvalFrameEx in "/usr/lib/libpython2.7.so.1.0"<br>
#29Â PyEval_EvalCodeEx in "/usr/lib/libpython2.7.so.1.0"<br>
#30Â PyEval_EvalCode in "/usr/lib/libpython2.7.so.1.0"<br>
#31Â ? in "/usr/lib/libpython2.7.so.1.0"<br>
#32Â PyRun_StringFlags in "/usr/lib/libpython2.7.so.1.0"<br>
#33Â PyRun_SimpleStringFlags in "/usr/lib/libpython2.7.so.1.0"<br>
#34Â vtkPythonInterpreter::RunSimpleString(char const*) in
"/home/user1/OpenFOAM/ThirdParty-5.x/platforms/linux64Gcc/ParaView-5.4.1/lib/paraview-5.4/libvtkPythonInterpreter-pv5.4.so.1"<br>
#35Â vtkCPPythonScriptPipeline::CoProcess(vtkCPDataDescription*)
in
"/home/user1/OpenFOAM/ThirdParty-5.x/platforms/linux64Gcc/ParaView-5.4.1/lib/paraview-5.4/libvtkPVPythonCatalyst-pv5.4.so.1"<br>
#36Â vtkCPProcessor::CoProcess(vtkCPDataDescription*) in
"/home/user1/OpenFOAM/ThirdParty-5.x/platforms/linux64Gcc/ParaView-5.4.1/lib/paraview-5.4/libvtkPVCatalyst-pv5.4.so.1"<br>
#37Â ? at ~/Desktop/Catalyst/icoFoam/OFAdaptor.C:1337<br>
#38Â ? at ~/Desktop/Catalyst/icoFoam/icoFoam.C:128<br>
#39Â __libc_start_main in "/usr/lib/libc.so.6"<br>
#40Â ? at ??:?<br>
Floating point exception (core dumped)<br>
</p>
<p><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/27/2018 02:06 AM, Andy Bauer
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAMaOp+E6yUmc6Ng20ZqMK-dN1Y=sJv1QZL0N2jTK2ZsafiEbUw@mail.gmail.com">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>Hi SeongMo,<br>
<br>
</div>
The AnnotateTime source should work with Catalyst. See
the attached images and the annotatetime.py script which
I used to create it. <br>
<br>
</div>
With your script, what do your images look like?<br>
<br>
</div>
You could also try what Ufuk mentioned. I think his work is
based on weather/climate time scales so he has to handle
months, leap years, etc. which ParaView itself doesn't
handle naturally. You can see some of the things he's done
with Catalyst at <a
href="https://blog.kitware.com/integration-of-paraview-catalyst-with-regional-earth-system-model/"
moz-do-not-send="true">https://blog.kitware.com/integration-of-paraview-catalyst-with-regional-earth-system-model/</a>.<br>
<br>
</div>
Best,<br>
</div>
Andy<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Jan 25, 2018 at 10:47 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 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><span class="">void CoProcess(Foam::fvMesh& mesh,
Foam::Time& runTime)<br>
{<br>
      vtkNew<vtkCPDataDescription>
dataDescription;<br>
      dataDescription->AddInput("<wbr>input");<br>
</span> Â Â Â Â Â Â const double time = runTime.value();<br>
      const unsigned int timeStep =
runTime.timeIndex();<br>
      dataDescription->SetTimeData(<wbr>time,
timeStep);<span class=""><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-><wbr>ForceOutputOn();<br>
      }<br>
      if (Processor-><wbr>RequestDataDescription(<wbr>dataDescription.GetPointer())
!= 0)<br>
      {<br>
          Foam::polyMesh::<wbr>readUpdateState
meshState = mesh.readUpdate();<br>
<br>
          if(meshState != Foam::polyMesh::UNCHANGED)<br>
          {<br>
</span> Â Â Â Â Â Â Â Â Â Â Â Â Â Â // mesh moved? or mesh topology
changed?<br>
              BuildVTKGrid(mesh, true);<span class=""><br>
          }<br>
          UpdateVTKAttributes(mesh);<br>
          dataDescription-><wbr>GetInputDescriptionByName("<wbr>input")-><br>
              SetGrid(multiBlockDataSet);<br>
          Processor->CoProcess(<wbr>dataDescription.GetPointer());<br>
      }<br>
}</span></p>
<p>Regards.</p>
<p>SeongMo<br>
</p>
<span class="">
<pre class="m_8029400921037781151moz-signature" cols="72">SeongMo Yeon, Ph.D, Senior Engineer
Offshore Hydrodynamics Research
SAMSUNG HEAVY INDUSTRIES CO., LTD.
Central Research Institute
E-mail : <a class="m_8029400921037781151moz-txt-link-abbreviated" href="mailto:seongmo.yeon@gmail.com" target="_blank" moz-do-not-send="true">seongmo.yeon@gmail.com</a>
Tel :
------------------------------<wbr>--------------------------
Fluctuat nec mergitur </pre>
</span>
<div>
<div class="h5">
<div class="m_8029400921037781151moz-cite-prefix">On
01/25/2018 06:56 AM, Andy Bauer wrote:<br>
</div>
<blockquote type="cite">
<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_8029400921037781151m_-8627969882828805903HOEnZb">
<div
class="m_8029400921037781151m_-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>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>