CharacteristicSetVelocityInterpolation — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# CharacteristicSetVelocityInterpolation

Sets the routine used to interpolate the velocity field at points along a characteristic

## Synopsis

    #include "petsccharacteristic.h"
    PetscErrorCode CharacteristicSetVelocityInterpolation(Characteristic c, DM da, Vec v, Vec vOld, PetscInt numComponents, PetscInt components[], PetscErrorCode (*interp)(Vec v, PetscReal interpIndices[], PetscInt numComponents, PetscInt components[], PetscScalar values[], PetscCtx ctx), PetscCtx ctx)

Not Collective

## Input Parameters

- c - the `Characteristic` context

- da - the `DM` describing the layout of the velocity vectors

- v - the current velocity vector

- vOld - the previous-time-step velocity vector

- numComponents - the number of velocity components to interpolate

- components - the indices of the velocity components in `v` and `vOld`

- interp - the interpolation routine, called with the global vector

- ctx - context passed to the interpolation routine

## Calling sequence of `interp`

- v - the velocity `Vec` from which to interpolate

- interpIndices - the coordinates at which to interpolate

- numComponents - the number of components to interpolate

- components - the indices of the components in `v`

- values - the interpolated values, one per component per point

- ctx - the application context

## See Also

TS: Scalable ODE and DAE Solvers, `Characteristic`, `CharacteristicSetVelocityInterpolationLocal()`, `CharacteristicSetFieldInterpolation()`

## Level

developer

## Location

src/ts/characteristic/interface/characteristic.c

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