PetscRealViewNumColumns — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# PetscRealViewNumColumns

Prints an array of doubles; useful for debugging.

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscRealViewNumColumns(PetscInt N, PetscInt Ncol, const PetscReal idx[], PetscViewer viewer)

Collective

## Input Parameters

- N - number of `PetscReal` in array

- Ncol - number of `PetscReal` to print per row

- idx - array of `PetscReal`

- viewer - location to print array, `PETSC_VIEWER_STDOUT_WORLD`, `PETSC_VIEWER_STDOUT_SELF` or 0

## Note

This may be called from within the debugger, passing 0 as the viewer

This API may be removed in the future.

## Developer Note

`idx` cannot be const because may be passed to binary viewer where temporary byte swapping may be done

## See Also

`PetscViewer`, `PetscRealView()`, `PetscIntView()`

## Level

intermediate

## Location

src/sys/error/err.c

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