PetscPDFSampleConstant1D — PETSc 3.25.2 documentation

Skip to main content
`Ctrl`+`K`

# PetscPDFSampleConstant1D

Sample uniformly from a uniform distribution on [-1, 1] in 1D

## Synopsis

    #include "petscdt.h"
    PetscErrorCode PetscPDFSampleConstant1D(const PetscReal p[], const PetscReal unused[], PetscReal x[])

Not Collective

## Input Parameters

- p - A uniform variable on \([0, 1]\)

- unused - Unused

## Output Parameter

- x - Coordinate in \([-1, 1]\)

## See Also

`PetscPDFConstant1D()`, `PetscCDFConstant1D()`, `PetscPDFSampleConstant2D()`, `PetscPDFSampleConstant3D()`

## Level

beginner

## Location

src/dm/dt/interface/dtprob.c

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