# Check if pipeline update is required in Catalyst V2

**URL:** https://discourse.paraview.org/t/check-if-pipeline-update-is-required-in-catalyst-v2/10375
**Category:** In Situ Support
**Created:** [September 21, 2022, 3:34pm UTC](https://discourse.paraview.org/t/check-if-pipeline-update-is-required-in-catalyst-v2/10375 "2022-09-21T15:34:15Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![cmorsbach](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cmorsbach/32/10016_2.png) [@cmorsbach](https://discourse.paraview.org/u/cmorsbach)
#### Post date: [September 21, 2022, 3:34pm UTC](https://discourse.paraview.org/t/check-if-pipeline-update-is-required-in-catalyst-v2/10375/1 "2022-09-21T15:34:15Z")

</div>

We are trying to port our Catalyst adaptor from V1 to V2. In V1 we were able to check if a pipeline update is required via something like:

```auto
    dataDescription->SetTimeData(currentTimeDimensional, timeStep);

    bool updateRequired = processor->RequestDataDescription(dataDescription) != 0;

```

This is rather important to us since we prepare data to pass to Catalyst. This operation is expensive and should not be done unless really needed.

We can’t find anything equivalent in the new V2 API. Does it not yet exist or did we miss it somewhere?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 22, 2022, 2:40am UTC](https://discourse.paraview.org/t/check-if-pipeline-update-is-required-in-catalyst-v2/10375/2 "2022-09-22T02:40:36Z")

</div>

@nicolas.vuaille @Francois_Mazen

---

<div class="post-metadata">

### Author: ![Francois\_Mazen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/francois_mazen/32/6483_2.png) [@Francois\_Mazen](https://discourse.paraview.org/u/Francois_Mazen)
#### Post date: [September 22, 2022, 3:40pm UTC](https://discourse.paraview.org/t/check-if-pipeline-update-is-required-in-catalyst-v2/10375/3 "2022-09-22T15:40:27Z")

</div>

Hello @cmorsbach

Indeed, this feature is not available in Catalyst 2, you must always call the C method `catalyst_execute` and the control is delegated to the python script:

- the trigger parameters of the extractors and the catalyst option object change the frequency of the write to the disk.
- You can always fine tune the execution of your pipeline with the [python methods `def catalyst_execute:`](https://gitlab.kitware.com/paraview/paraview/-/blob/master/Examples/Catalyst2/CxxImageDataExample/catalyst_pipeline.py#L22).

In addition, using conduit node set\_external method for zero copy makes the data wrapping process quite small, so the previous overhead of creating VTK structures should be removed.

Do not hesitate to ask for more help.

Best,

---

<div class="post-metadata">

### Author: ![cmorsbach](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cmorsbach/32/10016_2.png) [@cmorsbach](https://discourse.paraview.org/u/cmorsbach)
#### Post date: [September 23, 2022, 5:48am UTC](https://discourse.paraview.org/t/check-if-pipeline-update-is-required-in-catalyst-v2/10375/4 "2022-09-23T05:48:17Z")

</div>

Thanks for the quick reply, @Francois_Mazen!

I agree, that it would be very desirable to pass everything with zero copy. However, for us this would require a complete support of VtkLagrangeHexahedron elements. I couldn’t find those in [Mesh Blueprint — Conduit 0.8.4 documentation](https://llnl-conduit.readthedocs.io/en/latest/blueprint_mesh.html).

So, for now, we have to rely on rather expensive interpolation operations from our high order hexahedral grid onto a finer standard hexahedral grid. And this we can’t afford to do every time step.

Are there plans to extend the API in this direction or would this be a feature against the philosophy behind it?

P.S. Thanks for all the great work on Paraview and Catalyst in the recent years! We’ve been using it quite intensively.

---

<div class="post-metadata">

### Author: ![Francois\_Mazen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/francois_mazen/32/6483_2.png) [@Francois\_Mazen](https://discourse.paraview.org/u/Francois_Mazen)
#### Post date: [September 26, 2022, 7:16am UTC](https://discourse.paraview.org/t/check-if-pipeline-update-is-required-in-catalyst-v2/10375/5 "2022-09-26T07:16:41Z")

</div>

Indeed, Catalyst 2 dataset features are limited by conduit capabilities and advanced cell types are not yet supported. Conduit project is very active and open to contribution, so you may request such addition at their [github repo](https://github.com/llnl/conduit), or push it yourself if you have developer skills and time.

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [September 26, 2022, 7:40am UTC](https://discourse.paraview.org/t/check-if-pipeline-update-is-required-in-catalyst-v2/10375/6 "2022-09-26T07:40:49Z")

</div>

Hi @cmorsbach ,

Please note also that catalyst scripts handled a `GlobalTrigger` in the `Options` object, that behave like the `Trigger` from the extractors.  
The method “catalyst\_execute” is not called if the trigger is not respected.

This can be timestep based:

```python
# ------------------------------------------------------------------------------
# Catalyst options
from paraview import catalyst
options = catalyst.Options()
options.GlobalTrigger = 'TimeStep'

# init the 'TimeStep' selected for 'GlobalTrigger'
options.GlobalTrigger.UseStartTimeStep = 1
options.GlobalTrigger.StartTimeStep = 1
options.GlobalTrigger.UseEndTimeStep = 1
options.GlobalTrigger.EndTimeStep = 5
options.GlobalTrigger.Frequency = 2

```

Or custom python code:

```python
# Catalyst options
from paraview import catalyst
options = catalyst.Options()

# init the 'Python' selected for 'GlobalTrigger'
options.GlobalTrigger = 'Python'
options.GlobalTrigger.Script = """\
def is_activated(controller):
    from os.path import basename
    from paraview import print_info
    from paraview.catalyst import get_script_filename
    timestep = controller.GetTimeStep()
    time = controller.GetTime()
    if timestep < 2:
        # start from timestep 2
        return False
    if (timestep - 2) % 7 != 0:
        # frequency 7
        return False
    print_info("'%s' activated for timestep %d." % (basename(get_script_filename()), timestep))
    return True
"""

```
