<div dir="ltr">For Catalyst Live you can use the Python Annotation filter to show the time after you've extracted the Annotate Time Filter from the Calalyst simulation run. You'll need to change the Array Association to Row Data and put in "Text.GetValue(0)" in the Expression.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 29, 2018 at 8:59 PM, Seong Mo Yeon <span dir="ltr"><<a href="mailto:seongmo.yeon@gmail.com" target="_blank">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"><font color="#333333">Hi, Andi Bauer,<br>
<br>
I found that annotate time filter works in live visualization and the error occurs when output rendering components is activated.<br>
gdb says the error occurs at vtkSMBoundsDomain.cxx: 60<br>
vtkPVDataInformation* info = this->GetInputInformation();<br>
if (info)<br>
{<br>
double bounds[6];<br>
info->GetBounds(bounds);<br>
this->SetDomainValues(bounds);<br>
}<br>
<br>
and the vtkPVDataInformation has the following information:<br>
<br>
members of vtkPVDataInformation:<br>
DataSetType = 19,<br>
CompositeDataSetType = -1,<br>
NumberOfDataSets = 1,<br>
NumberOfPoints = 0,<br>
NumberOfCells = 1,<br>
NumberOfRows = 1,<br>
MemorySize = 1,<br>
PolygonCount = 0,<br>
Bounds = {1.0000000000000001e+299, -1.0000000000000001e+299, 1.0000000000000001e+299, -1.0000000000000001e+299, 1.0000000000000001e+299, -1.0000000000000001e+299},<br>
Extent = {</font><font color="#3E80DE"><a href="tel:(214)%20748-3647" value="+12147483647" target="_blank">2147483647</a></font><font color="#333333">, -</font><font color="#3E80DE"><a href="tel:(214)%20748-3647" value="+12147483647" target="_blank">2147483647</a></font><font color="#333333">,</font> <font color="#3E80DE"><a href="tel:(214)%20748-3647" value="+12147483647" target="_blank">2147483647</a></font><font color="#333333">, -</font><font color="#3E80DE"><a href="tel:(214)%20748-3647" value="+12147483647" target="_blank">2147483647</a></font><font color="#333333">,</font> <font color="#3E80DE"><a href="tel:(214)%20748-3647" value="+12147483647" target="_blank">2147483647</a></font><font color="#333333">, -</font><font color="#3E80DE"><a href="tel:(214)%20748-3647" value="+12147483647" target="_blank">2147483647</a></font><font color="#333333">},<br>
TimeSpan = {-1.0000000000000001e+299, 1.0000000000000001e+299},<br>
Time = 0.0050000000000000001,<br>
HasTime = 1,<br>
NumberOfTimeSteps = 0,<br>
DataClassName = 0x55555996b050 "vtkTable",<br>
TimeLabel = 0x0,<br>
CompositeDataClassName = 0x0,<br>
CompositeDataSetName = 0x0,<br>
PointDataInformation = 0x555558ec6430,<br>
CellDataInformation = 0x555558ec66d0,<br>
FieldDataInformation = 0x555558ec6770,<br>
VertexDataInformation = 0x555558ec6890,<br>
EdgeDataInformation = 0x555558ec67f0,<br>
RowDataInformation = 0x555558ec6370,<br>
CompositeDataInformation = 0x555558eb5430,<br>
PointArrayInformation = 0x555558ec6c50,<br>
PortNumber = 0<br>
<br>
my guess is that annotate time filter is a type of vtkTable and Bounds member variable has too large values. Any idea?<br>
<br>
Regards<br>
<br>
SeongMo</font></div><div><div class="h5">
<div name="messageReplySection"><br>
On 2018년 1월 27일 AM 2:06 +0900, Andy Bauer <<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>>, wrote:<br>
<blockquote type="cite">
<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/" target="_blank">https://blog.kitware.com/<wbr>integration-of-paraview-<wbr>catalyst-with-regional-earth-<wbr>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">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>void CoProcess(Foam::fvMesh& mesh, Foam::Time& runTime)<br>
{<br>
vtkNew<vtkCPDataDescription> dataDescription;<br>
dataDescription->AddInput("inp<wbr>ut");<br></span> const double time = runTime.value();<br>
const unsigned int timeStep = runTime.timeIndex();<br>
dataDescription->SetTimeData(t<wbr>ime, timeStep);<span><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<wbr>();<br>
}<br>
if (Processor->RequestDataDescrip<wbr>tion(dataDescription.<wbr>GetPointer()) != 0)<br>
{<br>
Foam::polyMesh::readUpdateStat<wbr>e meshState = mesh.readUpdate();<br>
<br>
if(meshState != Foam::polyMesh::UNCHANGED)<br>
{<br></span> // mesh moved? or mesh topology changed?<br>
BuildVTKGrid(mesh, true);<span><br>
}<br>
UpdateVTKAttributes(mesh);<br>
dataDescription->GetInputDescr<wbr>iptionByName("input")-><br>
SetGrid(multiBlockDataSet);<br>
Processor->CoProcess(dataDescr<wbr>iption.GetPointer());<br>
}<br>
}</span></p>
<p>Regards.</p>
<p>SeongMo<br></p>
<span></span>
<pre class="m_7969920438687545631m_8029400921037781151moz-signature" cols="72"><span>SeongMo Yeon, Ph.D, Senior Engineer
Offshore Hydrodynamics Research
SAMSUNG HEAVY INDUSTRIES CO., LTD.
Central Research Institute
E-mail : <a class="m_7969920438687545631m_8029400921037781151moz-txt-link-abbreviated" href="mailto:seongmo.yeon@gmail.com" target="_blank">seongmo.yeon@gmail.com</a>
Tel :
------------------------------<wbr>--------------------------
Fluctuat nec mergitur </span></pre>
<div>
<div class="m_7969920438687545631h5">
<div class="m_7969920438687545631m_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">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">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">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_7969920438687545631m_8029400921037781151m_-8627969882828805903HOEnZb">
<div class="m_7969920438687545631m_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">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">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">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">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">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">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>
</div>
</div></div></div>
</blockquote></div><br></div>