Skip to main content
`Ctrl`+`K`

# PetscPDFSampleConstant2D

Sample uniformly from a uniform distribution on \([-1, 1]^2\) in 2D

## Synopsis

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

Not Collective

## Input Parameters

- p - Two uniform variables on \([0, 1]\)

- unused - Unused

## Output Parameter

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

## See Also

`PetscPDFConstant2D()`, `PetscCDFConstant2D()`, `PetscPDFSampleConstant1D()`, `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