Skip to main content
`Ctrl`+`K`

# PetscViewerExodusIISetZonalVariable

Sets the number of zonal variables in an exodusII file

## Synopsis

    #include "petscdmplex.h"
    PetscErrorCode PetscViewerExodusIISetZonalVariable(PetscViewer viewer, PetscExodusIIInt num)

Collective;

## Input Parameters

- viewer - a `PetscViewer` of type `PETSCVIEWEREXODUSII`

- num - the number of zonal variables in the exodusII file

## Notes

The exodusII API does not allow changing the number of variables in a file so this function will return an error if called twice, called on a read-only file, or called on file for which the number of variables has already been specified

## See Also

`PETSCVIEWEREXODUSII`, `PetscViewer`, `PetscViewerCreate()`, `PetscViewerDestroy()`, `PetscViewerExodusIIOpen()`, `PetscViewerSetType()`, `PetscViewerType`, `PetscViewerExodusIIGetZonalVariable()`

## Level

intermediate

## Location

src/dm/impls/plex/exodusii/plexexodusii2.c

Index of all DMPlex routines
Table of Contents for all manual pages
Index of all manual pages