# Savevtk with multiple scalar node field and cell scalar field

**URL:** <https://community.freefem.org/t/savevtk-with-multiple-scalar-node-field-and-cell-scalar-field/1483>\
**Category:** General Discussion\
**Created:** [February 9, 2022, 7:24pm UTC](https://community.freefem.org/t/savevtk-with-multiple-scalar-node-field-and-cell-scalar-field/1483 "2022-02-09T19:24:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrbenson](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@mrbenson](https://community.freefem.org/u/mrbenson)\
**Post date:** [February 9, 2022, 7:24pm UTC](https://community.freefem.org/t/savevtk-with-multiple-scalar-node-field-and-cell-scalar-field/1483/1 "2022-02-09T19:24:10Z")

</div>

Hi,

I have two questions related to the savevtk function :

- is there a way to save multiple (more than one) scalar node fields, in my case i need to save in the same vtu 10 scalar fields.
- is there a way to save a scalar cell field ? For instance i want to save the average flux by cell.

Best regards.

---

<div class="post-metadata">

**Author:** ![fivanci](https://avatars.discourse-cdn.com/v4/letter/f/e95f7d/32.png) [@fivanci](https://community.freefem.org/u/fivanci)\
**Post date:** [February 10, 2022, 2:14am UTC](https://community.freefem.org/t/savevtk-with-multiple-scalar-node-field-and-cell-scalar-field/1483/2 "2022-02-10T02:14:49Z")

</div>

Yes, for the both questions. Also, both of these can be done in a single line and saved in a single `.vtu` file.  
See documentation [Visualization](https://doc.freefem.org/documentation/visualization.html#link-with-paraview) for the essentials.

Something like this should work (in both 2D and 3D):

```auto
load "iovtk"
mesh Th = (...);
fespace Vh(Th,P1); Vh uh, vh;
fespace Qh(Th,P0); Qh qh;
int[int] vtuOrder=[1,1,0];
...
savevtk("data.vtu",Th,uh,vh,qh,dataname="u v q",order=vtuOrder);

```

if
