Greetings to all people here!

Some time ago I created a thread here, asking for help in properly displaying boundary patches from a CGNS file in ParaView.

The aforementioned thread is this one:

My new question is kind of a follow-up to that thread, but since that thread provided a complete solution I figured I’d leave it as is and create a new thread for my new question.

# What I want to do

I want to, if possible, display variables on boundary patches in a CGNS file that contains a **CellCenter** solution.

# What is the current situation

Per the replies on the previous thread, displaying variables in boundary patches requires a **Vertex** based solution in the CGNS file.

When I posted the previous thread I was working on a node-based solver and thus I was able to turn patches on and off and view the solution accordingly.

However, I now also have to work on a cell-based solver.

ParaView is, of course, able to pickup the boundary patches (via the *FamilySpecified* route discussed in the previous thread), however it cannot display the solution on boundary patches.

This is completely expected, since the values on boundary faces cannot be directly derived from the *CellCenter* solution in volume elements.

# What I’ve tried thus far

Since there is no official *CGNS for ParaView* documentation, I tried to find a way to make this work.

##
Using *Cell Data to Point Data* in ParaView → Does not work

At first, I figured that if I convert the Cell solution to a Point solution I would be able to visualize variables in boundary patches.

Unfortunately, this does not work. If you use the filter to convert the solution from Cells to Points, it only converts the solution in the Volume Mesh, not on boundary patches.

As far as I can tell, ParaView loads the volume and boundary meshes as separate entities.

One can verify this by examining the total number of Cells and Nodes before and after the *Load Patches* option.

If *Load Patches* is turned on, the total number of nodes is multiplied by the number of patches.

This implies that ParaView takes all nodes and stores them independently for each boundary patch.

Thus, if you convert Cell Data To Point Data, it only affects the volume mesh.

Boundary patch meshes are not affected.

## Resampling from volume mesh to the boundary meshes → Does not work

I also gave this hacky way a try, of course it doesn’t work.

For a given mesh, the boundary is not surrounded by any cell (since it is in the boundary).

Thus the resampling does not return anything.

##
Using the official CGNS *ParentData* array for boundary elements → Does not work

CGNS provides the option to store parent elements for boundary patches.

For each boundary element (face), the neighbor volume cell elements are given, in addition to the corresponding number of cell-face that the boundary face matches to.

Unfortunately, ParaView still does not seem to pickup the solution.

The corresponding functionality is probably not implemented in the CGNS reader.

## Converting the CellCenter solution to a Vertex solution using CGNStools → Works, but is kinda slow

By using the *convert_location* utility provided by the CGNS library, one can convert a CellCenter solution to a Vertex solution. ParaView then can display variables on patches accordingly.

This option works but the *convert_location* utility is kinda slow, converting the solution on large datasets takes a lot of time. However, it only needs to be done once for each solution file.

# What other options are there, if any?

Is there anything else I can try?

Fortunately, the *convert_solution* utility can kinda do the trick.

However, perhaps there’s a way to do this more *elegantly*.

Converting the solution can take a couple of hours for large datasets.