# How to create a vtkUnstructuredGrid in parallel

**URL:** https://discourse.vtk.org/t/how-to-create-a-vtkunstructuredgrid-in-parallel/532
**Category:** Development
**Created:** [March 19, 2019, 2:31pm UTC](https://discourse.vtk.org/t/how-to-create-a-vtkunstructuredgrid-in-parallel/532 "2019-03-19T14:31:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![SergeLalonde](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sergelalonde/32/3642_2.png) [@SergeLalonde](https://discourse.vtk.org/u/SergeLalonde)
#### Post date: [March 19, 2019, 2:31pm UTC](https://discourse.vtk.org/t/how-to-create-a-vtkunstructuredgrid-in-parallel/532/1 "2019-03-19T14:31:08Z")

</div>

Is it possible to initialize a vtkUnstructured grid in parallel? Ex: using OpenMP.  
The InsertNextCell() method is definitely not thread safe, even if Allocate() is called beforehand.

If there was a SetCell(vtkIdType id, int type, vtkIdType npts, vtkIdType \*ptIds) this would be possible, but there isn’t. Is there an alternative?

Thanks.
