IS (Index Sets) - Low-level Interface

The IS (Index Set) component provides data structures and operations for managing sets of indices, which are fundamental for parallel data distribution, matrix/vector assembly, and mapping between different numbering schemes.

Overview

Index sets are used throughout PETSc for:

  • Parallel data distribution: Specifying which indices are owned by each processor
  • Submatrix/subvector extraction: Selecting specific rows/columns
  • Scatter/gather operations: Defining communication patterns
  • Field splitting: Identifying DOFs belonging to different fields
  • Reordering: Specifying permutations for bandwidth reduction

PETSc provides several IS types:

  • General IS: Arbitrary list of indices
  • Stride IS: Regularly spaced indices (start, step, length)
  • Block IS: Block-structured indices
  • Complement IS: All indices except specified ones

Basic Usage

using PETSc, MPI

# Initialize MPI and PETSc
MPI.Init()
petsclib = PETSc.getlib()
PETSc.initialize(petsclib)

# Get PETSc types
PetscInt = petsclib.PetscInt

# Create an index set from an array of indices (0-based)
# Note: indices should be PetscInt type (typically Int64 or Int32 depending on PETSc configuration)
indices = PetscInt[0, 2, 4, 6, 8]
is = LibPETSc.ISCreateGeneral(petsclib, LibPETSc.PETSC_COMM_SELF, PetscInt(length(indices)), indices, LibPETSc.PETSC_COPY_VALUES)

# Create a stride index set: indices = first:step:(first + step*(n-1))
is_stride = LibPETSc.ISCreateStride(petsclib, LibPETSc.PETSC_COMM_SELF, PetscInt(10), PetscInt(0), PetscInt(2))  # 0, 2, 4, ..., 18

# Get the size of an index set (returns value directly)
n = LibPETSc.ISGetSize(petsclib, is)

# Get local size (returns value directly)
local_n = LibPETSc.ISGetLocalSize(petsclib, is)

# Get indices as an array
indices = LibPETSc.ISGetIndices(petsclib, is)
# ... use indices ...
LibPETSc.ISRestoreIndices(petsclib, is, indices)

# Cleanup
LibPETSc.ISDestroy(petsclib, is)
LibPETSc.ISDestroy(petsclib, is_stride)

# Finalize PETSc and MPI
PETSc.finalize(petsclib)
MPI.Finalize()

Common Operations

Creating Index Sets

# General index set from array
is = LibPETSc.ISCreateGeneral(petsclib, comm, n, indices, copymode)

# Stride index set: first, first+step, first+2*step, ...
is = LibPETSc.ISCreateStride(petsclib, comm, n, first, step)

# Block index set: block-structured indices
is = LibPETSc.ISCreateBlock(petsclib, comm, blocksize, n, indices, copymode)

Set Operations

# Union of two index sets
is_union = LibPETSc.ISSum(petsclib, is1, is2)

# Difference: is1 - is2
is_diff = LibPETSc.ISDifference(petsclib, is1, is2)

# Intersection
is_intersect = LibPETSc.ISIntersect(petsclib, is1, is2)

# Complement: all indices in [nmin, nmax) not in is
is_complement = LibPETSc.ISComplement(petsclib, is, nmin, nmax)

Querying Properties

# Check if index set is sorted (returns a PetscBool)
is_sorted = LibPETSc.ISSorted(petsclib, is) == LibPETSc.PETSC_TRUE

# Check if identity permutation
is_identity = LibPETSc.ISIdentity(petsclib, is) == LibPETSc.PETSC_TRUE

# Check if a permutation
is_perm = LibPETSc.ISPermutation(petsclib, is) == LibPETSc.PETSC_TRUE

Index Set Types

Available through ISSetType:

  • ISGENERAL: General list of indices
  • ISSTRIDE: Arithmetic sequence
  • ISBLOCK: Block-structured indices

Scatter Context

Index sets are used to create scatter contexts for moving data between vectors:

# Create scatter context
scatter = LibPETSc.VecScatterCreate(petsclib, vec_from, is_from, vec_to, is_to)

# Perform scatter operation
LibPETSc.VecScatterBegin(petsclib, scatter, vec_from, vec_to, LibPETSc.INSERT_VALUES, LibPETSc.SCATTER_FORWARD)
LibPETSc.VecScatterEnd(petsclib, scatter, vec_from, vec_to, LibPETSc.INSERT_VALUES, LibPETSc.SCATTER_FORWARD)
LibPETSc.VecScatterDestroy(petsclib, scatter)

Parallel Considerations

  • Index sets use global indexing by default
  • Each processor owns a portion of the index set
  • Use ISGetLocalSize to get the local portion
  • Scatter operations handle parallel communication automatically

Function Reference

PETSc.LibPETSc.ISAllGather — Method
isout::IS = ISAllGather(petsclib::PetscLibType, is::AbstractIS)

Given an index set IS on each processor, generates a large index set (same on each processor) by concatenating together each processors index set.

Collective

Input Parameter:

  • is - the distributed index set

Output Parameter:

  • isout - the concatenated index set (same on all processors)

Level: intermediate

See also: IS, ISCreateGeneral(), ISCreateStride(), ISCreateBlock()

External Links

source
PETSc.LibPETSc.ISAllGatherColors — Method
outN::PetscInt,outindices::Vector{ISColoringValue} = ISAllGatherColors(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, lindices::Vector{ISColoringValue})

Given a set of colors on each processor, generates a large set (same on each processor) by concatenating together each processors colors

Collective

Input Parameters:

  • comm - communicator to share the indices
  • n - local size of set
  • lindices - local colors

Output Parameters:

  • outN - total number of indices
  • outindices - all of the colors

Level: intermediate

See also: ISColoringValue, ISColoring(), ISCreateGeneral(), ISCreateStride(), ISCreateBlock(), ISAllGather()

External Links

source
PETSc.LibPETSc.ISBlockGetIndices — Method
idx::Vector{PetscInt} = ISBlockGetIndices(petsclib::PetscLibType, is::AbstractIS)

Gets the indices associated with each block in an ISBLOCK

Not Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • idx - the integer indices, one for each block and count of block not indices

Level: intermediate

See also: IS, ISBLOCK, ISGetIndices(), ISBlockRestoreIndices(), ISBlockSetIndices(), ISCreateBlock()

External Links

source
PETSc.LibPETSc.ISBlockGetLocalSize — Method
size::PetscInt = ISBlockGetLocalSize(petsclib::PetscLibType, is::AbstractIS)

Returns the local number of blocks in the index set of ISType ISBLOCK

Not Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • size - the local number of blocks

Level: intermediate

See also: IS, ISGetBlockSize(), ISBlockGetSize(), ISGetSize(), ISCreateBlock(), ISBLOCK

External Links

source
PETSc.LibPETSc.ISBlockGetSize — Method
size::PetscInt = ISBlockGetSize(petsclib::PetscLibType, is::AbstractIS)

Returns the global number of blocks in parallel in the index set of ISType ISBLOCK

Not Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • size - the global number of blocks

Level: intermediate

See also: IS, ISGetBlockSize(), ISBlockGetLocalSize(), ISGetSize(), ISCreateBlock(), ISBLOCK

External Links

source
PETSc.LibPETSc.ISBlockRestoreIndices — Method
ISBlockRestoreIndices(petsclib::PetscLibType, is::AbstractIS, idx::Union{Ptr, AbstractArray{PetscInt}})

Restores the indices associated with each block in an ISBLOCK obtained with ISBlockGetIndices()

Not Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • idx - the integer indices

Level: intermediate

See also: IS, ISBLOCK, ISRestoreIndices(), ISBlockGetIndices()

External Links

source
PETSc.LibPETSc.ISBlockSetIndices — Method
ISBlockSetIndices(petsclib::PetscLibType, is::AbstractIS, bs::PetscInt, n::PetscInt, idx::Vector{PetscInt}, mode::PetscCopyMode)

Set integers representing blocks of indices in an index set of ISType ISBLOCK

Collective

Input Parameters:

  • is - the index set
  • bs - number of elements in each block
  • n - the length of the index set (the number of blocks)
  • idx - the list of integers, one for each block, the integers contain the index of the first index of each block divided by the block size
  • mode - see PetscCopyMode, only PETSC_COPY_VALUES and PETSC_OWN_POINTER are supported

Level: beginner

See also: IS, ISCreateStride(), ISCreateGeneral(), ISAllGather(), ISCreateBlock(), ISBLOCK, ISGeneralSetIndices()

External Links

source
PETSc.LibPETSc.ISBuildTwoSided — Method
rows::IS = ISBuildTwoSided(petsclib::PetscLibType, ito::AbstractIS, toindx::AbstractIS)

Takes an IS that describes where each element will be mapped globally over all ranks. Generates an IS that contains new numbers from remote or local on the IS.

Collective

Input Parameters:

  • ito - an IS describes to which rank each entry will be mapped. Negative target rank will be ignored
  • toindx - an IS describes what indices should send. NULL means sending natural numbering

Output Parameter:

  • rows - contains new numbers from remote or local

Level: advanced

See also: IS, MatPartitioningCreate(), ISPartitioningToNumbering(), ISPartitioningCount()

External Links

source
PETSc.LibPETSc.ISClearInfoCache — Method
ISClearInfoCache(petsclib::PetscLibType, is::AbstractIS, clear_permanent_local::PetscBool)

clear the cache of computed index set properties

Not Collective

Input Parameters:

  • is - the index set
  • clear_permanent_local - whether to remove the permanent status of local properties

Level: developer

See also: IS, ISInfo, ISInfoType, ISSetInfo()

External Links

source
PETSc.LibPETSc.ISComplement — Method
isout::IS = ISComplement(petsclib::PetscLibType, is::AbstractIS, nmin::PetscInt, nmax::PetscInt)

Given an index set IS generates the complement index set. That is all indices that are NOT in the given set.

Collective

Input Parameters:

  • is - the index set
  • nmin - the first index desired in the local part of the complement
  • nmax - the largest index desired in the local part of the complement (note that all indices in is must be greater or equal to nmin and less than nmax)

Output Parameter:

  • isout - the complement

Level: intermediate

See also: IS, ISCreateGeneral(), ISCreateStride(), ISCreateBlock(), ISAllGather()

External Links

source
PETSc.LibPETSc.ISComplementVec — Method
T::IS = ISComplementVec(petsclib::PetscLibType, S::AbstractIS, V::AbstractPetscVec)

Creates the complement of the index set relative to a layout defined by a Vec

Collective

Input Parameters:

  • S - a PETSc IS
  • V - the reference vector space

Output Parameter:

  • T - the complement of S

Level: advanced

See also: IS, Vec, ISCreateGeneral()

External Links

source
PETSc.LibPETSc.ISCompressIndicesGeneral — Method
ISCompressIndicesGeneral(petsclib::PetscLibType, n::PetscInt, nkeys::PetscInt, bs::PetscInt, imax::PetscInt, is_in::Vector{<:AbstractIS}, is_out::Vector{<:AbstractIS})

convert the indices of an array of IS into an array of ISGENERAL of block indices

Input Parameters:

  • n - maximum possible length of the index set
  • nkeys - expected number of keys when using PETSC_USE_CTABLE
  • bs - the size of block
  • imax - the number of index sets
  • is_in - the non-blocked array of index sets

Output Parameter:

  • is_out - the blocked new index set, as ISGENERAL, not as ISBLOCK

Level: intermediate

See also: IS, ISGENERAL, ISExpandIndicesGeneral()

External Links

source
PETSc.LibPETSc.ISConcatenate — Method
isout::IS = ISConcatenate(petsclib::PetscLibType, comm::MPI_Comm, len::PetscInt, islist::Vector{<:AbstractIS})

Forms a new IS by locally concatenating the indices from an IS list without reordering.

Collective

Input Parameters:

  • comm - communicator of the concatenated IS.
  • len - size of islist array (nonnegative)
  • islist - array of index sets

Output Parameter:

  • isout - The concatenated index set; empty, if len == 0.

Level: intermediate

See also: IS, ISDifference(), ISSum(), ISExpand(), ISIntersect()

External Links

source
PETSc.LibPETSc.ISContiguousLocal — Method
start::PetscInt,contig::PetscBool = ISContiguousLocal(petsclib::PetscLibType, is::AbstractIS, gstart::PetscInt, gend::PetscInt)

Locates an index set with contiguous range within a global range, if possible

Not Collective

Input Parameters:

  • is - the index set
  • gstart - global start
  • gend - global end

Output Parameters:

  • start - start of contiguous block, as an offset from gstart
  • contig - PETSC_TRUE if the index set refers to contiguous entries on this process, else PETSC_FALSE

Level: developer

See also: IS, ISGetLocalSize(), VecGetOwnershipRange()

External Links

source
PETSc.LibPETSc.ISCopy — Method
ISCopy(petsclib::PetscLibType, is::AbstractIS, isy::AbstractIS)

Copies an index set.

Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • isy - the copy of the index set

Level: beginner

See also: IS, ISDuplicate(), ISShift()

External Links

source
PETSc.LibPETSc.ISCreate — Method
is::IS = ISCreate(petsclib::PetscLibType, comm::MPI_Comm)

Create an index set object. IS, index sets, are PETSc objects used to do efficient indexing into other data structures such as Vec and Mat

Collective

Input Parameter:

  • comm - the MPI communicator

Output Parameter:

  • is - the new index set

Level: beginner

See also: IS, ISType(), ISSetType(), ISCreateGeneral(), ISCreateStride(), ISCreateBlock(), ISAllGather()

External Links

source
PETSc.LibPETSc.ISCreateBlock — Method
is::IS = ISCreateBlock(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, n::PetscInt, idx::Vector{PetscInt}, mode::PetscCopyMode)

Creates a data structure for an index set containing a list of integers. Each integer represents a fixed block size set of indices.

Collective

Input Parameters:

  • comm - the MPI communicator
  • bs - number of elements in each block
  • n - the length of the index set (the number of blocks)
  • idx - the list of integers, one for each block, the integers contain the index of the first entry of each block divided by the block size
  • mode - see PetscCopyMode, only PETSC_COPY_VALUES and PETSC_OWN_POINTER are supported in this routine

Output Parameter:

  • is - the new index set

Level: beginner

See also: IS, ISCreateStride(), ISCreateGeneral(), ISAllGather(), ISBlockSetIndices(), ISBLOCK, ISGENERAL

External Links

source
PETSc.LibPETSc.ISCreateGeneral — Method
is::IS = ISCreateGeneral(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, idx::Vector{PetscInt}, mode::PetscCopyMode)

Creates a data structure for an index set containing a list of integers.

Collective

Input Parameters:

  • comm - the MPI communicator
  • n - the length of the index set
  • idx - the list of integers
  • mode - PETSC_COPY_VALUES, PETSC_OWN_POINTER, or PETSC_USE_POINTER; see PetscCopyMode for meaning of this flag.

Output Parameter:

  • is - the new index set

Level: beginner

See also: IS, ISGENERAL, ISCreateStride(), ISCreateBlock(), ISAllGather(), PETSC_COPY_VALUES, PETSC_OWN_POINTER, PETSC_USE_POINTER, PetscCopyMode, ISGeneralSetIndicesFromMask()

External Links

source
PETSc.LibPETSc.ISCreateStride — Method
is::IS = ISCreateStride(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, first::PetscInt, step::PetscInt)

Creates a data structure for an index set containing a list of evenly spaced integers.

Collective

Input Parameters:

  • comm - the MPI communicator
  • n - the length of the locally owned portion of the index set
  • first - the first element of the locally owned portion of the index set
  • step - the change to the next index

Output Parameter:

  • is - the new index set

Level: beginner

See also: IS, ISStrideSetStride(), ISCreateGeneral(), ISCreateBlock(), ISAllGather(), ISSTRIDE

External Links

source
PETSc.LibPETSc.ISCreateSubIS — Method
subis::IS = ISCreateSubIS(petsclib::PetscLibType, is::AbstractIS, comps::AbstractIS)

Create a sub index set from a global index set selecting some components.

Collective

Input Parameters:

  • is - the index set
  • comps - which components we will extract from is

Output Parameters:

  • subis - the new sub index set

Example usage: We have an index set is living on 3 processes with the following values: | 4 9 0 | 2 6 7 | 10 11 1| and another index set comps used to indicate which components of is we want to take, | 7 5 | 1 2 | 0 4| The output index set subis should look like: | 11 7 | 9 0 | 4 6|

Level: intermediate

See also: IS, VecGetSubVector(), MatCreateSubMatrix()

External Links

source
PETSc.LibPETSc.ISDestroy — Method
ISDestroy(petsclib::PetscLibType, is::AbstractIS)

Destroys an index set.

Collective

Input Parameter:

  • is - the index set

Level: beginner

See also: IS, ISCreateGeneral(), ISCreateStride(), ISCreateBlock()

External Links

source
PETSc.LibPETSc.ISDifference — Method
isout::IS = ISDifference(petsclib::PetscLibType, is1::AbstractIS, is2::AbstractIS)

Computes the difference between two index sets.

Collective

Input Parameters:

  • is1 - first index, to have items removed from it
  • is2 - index values to be removed

Output Parameter:

  • isout - is1 - is2

Level: intermediate

See also: IS, ISDestroy(), ISView(), ISSum(), ISExpand()

External Links

source
PETSc.LibPETSc.ISDuplicate — Method
newIS::IS = ISDuplicate(petsclib::PetscLibType, is::AbstractIS)

Creates a duplicate copy of an index set.

Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • newIS - the copy of the index set

Level: beginner

See also: IS, ISCreateGeneral(), ISCopy()

External Links

source
PETSc.LibPETSc.ISEmbed — Method
c::IS = ISEmbed(petsclib::PetscLibType, a::AbstractIS, b::AbstractIS, drop::PetscBool)

Embed IS a into IS b by finding the locations in b that have the same indices as in a. If c is the IS of these locations, we have a = b*c, regarded as a composition of the corresponding ISLocalToGlobalMapping.

Not Collective

Input Parameters:

  • a - IS to embed
  • b - IS to embed into
  • drop - flag indicating whether to drop indices of a that are not in b.

Output Parameter:

  • c - local embedding indices

Level: developer

See also: IS, ISLocalToGlobalMapping

External Links

source
PETSc.LibPETSc.ISEqual — Method
flg::PetscBool = ISEqual(petsclib::PetscLibType, is1::AbstractIS, is2::AbstractIS)

Compares if two index sets have the same set of indices.

Collective

Input Parameters:

  • is1 - first index set to compare
  • is2 - second index set to compare

Output Parameter:

  • flg - output flag, either PETSC_TRUE (if both index sets have the

same indices), or PETSC_FALSE if the index sets differ by size or by the set of indices)

Level: intermediate

See also: IS, ISEqualUnsorted()

External Links

source
PETSc.LibPETSc.ISEqualUnsorted — Method
flg::PetscBool = ISEqualUnsorted(petsclib::PetscLibType, is1::AbstractIS, is2::AbstractIS)

Compares if two index sets have the same indices.

Collective

Input Parameters:

  • is1 - first index set to compare
  • is2 - second index set to compare

Output Parameter:

  • flg - output flag, either PETSC_TRUE (if both index sets have the

same indices), or PETSC_FALSE if the index sets differ by size or by the set of indices)

Level: intermediate

See also: IS, ISEqual()

External Links

source
PETSc.LibPETSc.ISExpand — Method
isout::IS = ISExpand(petsclib::PetscLibType, is1::AbstractIS, is2::AbstractIS)

Computes the union of two index sets, by concatenating 2 lists and removing duplicates.

Collective

Input Parameters:

  • is1 - first index set
  • is2 - index values to be added

Output Parameter:

  • isout - is1 + is2 The index set is2 is appended to is1 removing duplicates

Level: intermediate

See also: IS, ISDestroy(), ISView(), ISDifference(), ISSum(), ISIntersect()

External Links

source
PETSc.LibPETSc.ISExpandIndicesGeneral — Method
ISExpandIndicesGeneral(petsclib::PetscLibType, n::PetscInt, nkeys::PetscInt, bs::PetscInt, imax::PetscInt, is_in::Vector{<:AbstractIS}, is_out::Vector{<:AbstractIS})

convert the indices of an array IS into non-block indices in an array of ISGENERAL

Input Parameters:

  • n - the length of the index set (not being used)
  • nkeys - expected number of keys when PETSC_USE_CTABLE is used
  • bs - the size of block
  • imax - the number of index sets
  • is_in - the blocked array of index sets, must be as large as imax

Output Parameter:

  • is_out - the non-blocked new index set, as ISGENERAL, must be as large as imax

Level: intermediate

See also: IS, ISGENERAL, ISCompressIndicesGeneral()

External Links

source
PETSc.LibPETSc.ISGeneralFilter — Method
ISGeneralFilter(petsclib::PetscLibType, is::AbstractIS, start::PetscInt, end_::PetscInt)

Remove all indices outside of [start, end) from an ISGENERAL

Collective

Input Parameters:

  • is - the index set
  • start - the lowest index kept
  • end - one more than the highest index kept, start \le end

Level: beginner

See also: IS, ISGENERAL, ISCreateGeneral(), ISGeneralSetIndices()

External Links

source
PETSc.LibPETSc.ISGeneralSetIndices — Method
ISGeneralSetIndices(petsclib::PetscLibType, is::AbstractIS, n::PetscInt, idx::Vector{PetscInt}, mode::PetscCopyMode)

Sets the indices for an ISGENERAL index set

Logically Collective

Input Parameters:

  • is - the index set
  • n - the length of the index set
  • idx - the list of integers
  • mode - see PetscCopyMode for meaning of this flag.

Level: beginner

See also: IS, ISBLOCK, ISCreateGeneral(), ISGeneralSetIndicesFromMask(), ISBlockSetIndices(), ISGENERAL, PetscCopyMode

External Links

source
PETSc.LibPETSc.ISGeneralSetIndicesFromMask — Method
ISGeneralSetIndicesFromMask(petsclib::PetscLibType, is::AbstractIS, rstart::PetscInt, rend::PetscInt, mask::Vector{PetscBool})

Sets the indices for an ISGENERAL index set using a boolean mask

Collective

Input Parameters:

  • is - the index set
  • rstart - the range start index (inclusive)
  • rend - the range end index (exclusive)
  • mask - the boolean mask array of length rend-rstart, indices will be set for each PETSC_TRUE value in the array

Level: beginner

See also: IS, ISCreateGeneral(), ISGeneralSetIndices(), ISGENERAL

External Links

source
PETSc.LibPETSc.ISGetBlockSize — Method
size::PetscInt = ISGetBlockSize(petsclib::PetscLibType, is::AbstractIS)

Returns the number of elements in a block.

Not Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • size - the number of elements in a block

Level: intermediate

See also: IS, ISBlockGetSize(), ISGetSize(), ISCreateBlock(), ISSetBlockSize()

External Links

source
PETSc.LibPETSc.ISGetCompressOutput — Method
compress::PetscBool = ISGetCompressOutput(petsclib::PetscLibType, is::AbstractIS)

Returns the flag for output compression

Not Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • compress - the flag to compress output

Level: intermediate

See also: IS, ISSetCompressOutput(), ISView()

External Links

source
PETSc.LibPETSc.ISGetIndices — Method
ptr::Vector{PetscInt} = ISGetIndices(petsclib::PetscLibType, is::AbstractIS)

Returns a pointer to the indices. The user should call ISRestoreIndices() after having looked at the indices. The user should NOT change the indices.

Not Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • ptr - the location to put the pointer to the indices

Level: intermediate

See also: IS, ISRestoreIndices()

External Links

source
PETSc.LibPETSc.ISGetInfo — Method
flg::PetscBool = ISGetInfo(petsclib::PetscLibType, is::AbstractIS, info::ISInfo, type::ISInfoType, compute::PetscBool)

Determine whether an index set satisfies a given property

Collective or Logically Collective if the type is IS_GLOBAL (logically collective if the value of the property has been permanently set with ISSetInfo())

Input Parameters:

  • is - the index set
  • info - describing a property of the index set, one of those listed in the documentation of ISSetInfo()
  • compute - if PETSC_FALSE, the property will not be computed if it is not already known and the property will be assumed to be false
  • type - whether the property is local (IS_LOCAL) or global (IS_GLOBAL)

Output Parameter:

  • flg - whether the property is true (PETSC_TRUE) or false (PETSC_FALSE)

Level: advanced

See also: IS, ISInfo, ISInfoType, ISSetInfo(), ISClearInfoCache()

External Links

source
PETSc.LibPETSc.ISGetLayout — Method
map::PetscLayout = ISGetLayout(petsclib::PetscLibType, is::AbstractIS)

get PetscLayout describing index set layout

Not Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • map - the layout

Level: developer

See also: IS, PetscLayout, ISSetLayout(), ISGetSize(), ISGetLocalSize()

External Links

source
PETSc.LibPETSc.ISGetLocalSize — Method
size::PetscInt = ISGetLocalSize(petsclib::PetscLibType, is::AbstractIS)

Returns the local (processor) length of an index set.

Not Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • size - the local size

Level: beginner

See also: IS, ISGetSize()

External Links

source
PETSc.LibPETSc.ISGetMinMax — Method
min::PetscInt,max::PetscInt = ISGetMinMax(petsclib::PetscLibType, is::AbstractIS)

Gets the minimum and maximum values in an IS

Not Collective

Input Parameter:

  • is - the index set

Output Parameters:

  • min - the minimum value, you may pass NULL
  • max - the maximum value, you may pass NULL

Level: intermediate

See also: IS, ISGetIndices(), ISRestoreIndices()

External Links

source
PETSc.LibPETSc.ISGetNonlocalIS — Method
complement::IS = ISGetNonlocalIS(petsclib::PetscLibType, is::AbstractIS)

Gather all nonlocal indices for this IS and present them as another sequential index set.

Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • complement - sequential IS with indices identical to the result of

ISGetNonlocalIndices()

Level: intermediate

See also: IS, ISGetNonlocalIndices(), ISRestoreNonlocalIndices(), ISAllGather(), ISGetSize()

External Links

source
PETSc.LibPETSc.ISGetNonlocalIndices — Method
indices::Vector{PetscInt} = ISGetNonlocalIndices(petsclib::PetscLibType, is::AbstractIS)

Retrieve an array of indices from remote processors in this communicator.

Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • indices - indices with rank 0 indices first, and so on, omitting

the current rank. Total number of indices is the difference total and local, obtained with ISGetSize() and ISGetLocalSize(), respectively.

Level: intermediate

See also: IS, ISGetTotalIndices(), ISRestoreNonlocalIndices(), ISGetSize(), ISGetLocalSize().

External Links

source
PETSc.LibPETSc.ISGetPointRange — Method
pStart::PetscInt,pEnd::PetscInt,points::Vector{PetscInt} = ISGetPointRange(petsclib::PetscLibType, pointIS::AbstractIS)

Returns a description of the points in an IS suitable for traversal

Not Collective

Input Parameter:

  • pointIS - The IS object

Output Parameters:

  • pStart - The first index, see notes
  • pEnd - One past the last index, see notes
  • points - The indices, see notes

Level: intermediate

See also: IS, ISRestorePointRange(), ISGetPointSubrange(), ISGetIndices(), ISCreateStride()

External Links

source
PETSc.LibPETSc.ISGetPointSubrange — Method
ISGetPointSubrange(petsclib::PetscLibType, subpointIS::AbstractIS, pStart::PetscInt, pEnd::PetscInt, points::Vector{PetscInt})

Configures the input IS to be a subrange for the traversal information given

Not Collective

Input Parameters:

  • subpointIS - The IS object to be configured
  • pStart - The first index of the subrange
  • pEnd - One past the last index for the subrange
  • points - The indices for the entire range, from ISGetPointRange()

Output Parameters:

  • subpointIS - The IS object now configured to be a subrange

Level: intermediate

See also: IS, ISGetPointRange(), ISRestorePointRange(), ISGetIndices(), ISCreateStride()

External Links

source
PETSc.LibPETSc.ISGetSize — Method
size::PetscInt = ISGetSize(petsclib::PetscLibType, is::AbstractIS)

Returns the global length of an index set.

Not Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • size - the global size

Level: beginner

See also: IS

External Links

source
PETSc.LibPETSc.ISGetTotalIndices — Method
indices::Vector{PetscInt} = ISGetTotalIndices(petsclib::PetscLibType, is::AbstractIS)

Retrieve an array containing all indices across the communicator.

Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • indices - total indices with rank 0 indices first, and so on; total array size is

the same as returned with ISGetSize().

Level: intermediate

See also: IS, ISRestoreTotalIndices(), ISGetNonlocalIndices(), ISGetSize()

External Links

source
PETSc.LibPETSc.ISGetType — Method
type::String = ISGetType(petsclib::PetscLibType, is::AbstractIS)

Gets the index set type name, ISType, (as a string) from the IS.

Not Collective

Input Parameter:

  • is - The index set

Output Parameter:

  • type - The index set type name

Level: intermediate

See also: IS, ISType, ISSetType(), ISCreate(), PetscObjectTypeCompare(), PetscObjectTypeCompareAny()

External Links

source
PETSc.LibPETSc.ISGlobalToLocalMappingApply — Method
nout::PetscInt = ISGlobalToLocalMappingApply(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, type::ISGlobalToLocalMappingMode, n::PetscInt, idx::Vector{PetscInt}, idxout::Vector{PetscInt})

Provides the local numbering for a list of integers specified with a global numbering.

Not Collective

Input Parameters:

  • mapping - mapping between local and global numbering
  • type - IS_GTOLM_MASK - maps global indices with no local value to -1 in the output list (i.e., mask them)

IS_GTOLM_DROP - drops the indices with no local value from the output list

  • n - number of global indices to map
  • idx - global indices to map

Output Parameters:

  • nout - number of indices in output array (if type == IS_GTOLM_MASK then nout = n)
  • idxout - local index of each global index, one must pass in an array long enough

to hold all the indices. You can call ISGlobalToLocalMappingApply() with idxout == NULL to determine the required length (returned in nout) and then allocate the required space and call ISGlobalToLocalMappingApply() a second time to set the values.

Level: advanced

See also: ISLocalToGlobalMapping, ISLocalToGlobalMappingApply(), ISGlobalToLocalMappingApplyBlock(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingDestroy()

External Links

source
PETSc.LibPETSc.ISGlobalToLocalMappingApplyBlock — Method
nout::PetscInt = ISGlobalToLocalMappingApplyBlock(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, type::ISGlobalToLocalMappingMode, n::PetscInt, idx::Vector{PetscInt}, idxout::Vector{PetscInt})

Provides the local block numbering for a list of integers specified with a block global numbering.

Not Collective

Input Parameters:

  • mapping - mapping between local and global numbering
  • type - IS_GTOLM_MASK - maps global indices with no local value to -1 in the output list (i.e., mask them)

IS_GTOLM_DROP - drops the indices with no local value from the output list

  • n - number of global indices to map
  • idx - global indices to map

Output Parameters:

  • nout - number of indices in output array (if type == IS_GTOLM_MASK then nout = n)
  • idxout - local index of each global index, one must pass in an array long enough

to hold all the indices. You can call ISGlobalToLocalMappingApplyBlock() with idxout == NULL to determine the required length (returned in nout) and then allocate the required space and call ISGlobalToLocalMappingApplyBlock() a second time to set the values.

Level: advanced

See also: ISLocalToGlobalMapping, ISLocalToGlobalMappingApply(), ISGlobalToLocalMappingApply(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingDestroy()

External Links

source
PETSc.LibPETSc.ISGlobalToLocalMappingApplyIS — Method
newis::IS = ISGlobalToLocalMappingApplyIS(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, type::ISGlobalToLocalMappingMode, is::AbstractIS)

Creates from an IS in the global numbering a new index set using the local numbering defined in an ISLocalToGlobalMapping context.

Not Collective

Input Parameters:

  • mapping - mapping between local and global numbering
  • type - IS_GTOLM_MASK - maps global indices with no local value to -1 in the output list (i.e., mask them)

IS_GTOLM_DROP - drops the indices with no local value from the output list

  • is - index set in global numbering

Output Parameter:

  • newis - index set in local numbering

Level: advanced

See also: ISGlobalToLocalMapping, ISGlobalToLocalMappingApply(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingDestroy()

External Links

source
PETSc.LibPETSc.ISIdentity — Method
ident::PetscBool = ISIdentity(petsclib::PetscLibType, is::AbstractIS)

Determines whether index set is the identity mapping.

Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • ident - PETSC_TRUE if an identity, else PETSC_FALSE

Level: intermediate

See also: IS, ISSetIdentity(), ISGetInfo()

External Links

source
PETSc.LibPETSc.ISInitializePackage — Method
ISInitializePackage(petsclib::PetscLibType)

This function initializes everything in the IS package. It is called from PetscDLLibraryRegister_petscvec() when using dynamic libraries, and on the first call to ISCreateXXXX() when using shared or static libraries.

Level: developer

See also: PetscInitialize()

External Links

source
PETSc.LibPETSc.ISIntersect — Method
isout::IS = ISIntersect(petsclib::PetscLibType, is1::AbstractIS, is2::AbstractIS)

Computes the intersection of two index sets, by sorting and comparing.

Collective

Input Parameters:

  • is1 - first index set
  • is2 - second index set

Output Parameter:

  • isout - the sorted intersection of is1 and is2

Level: intermediate

See also: IS, ISDestroy(), ISView(), ISDifference(), ISSum(), ISExpand(), ISConcatenate()

External Links

source
PETSc.LibPETSc.ISInvertPermutation — Method
isout::IS = ISInvertPermutation(petsclib::PetscLibType, is::AbstractIS, nlocal::PetscInt)

Creates a new permutation that is the inverse of a given permutation.

Collective

Input Parameters:

  • is - the index set
  • nlocal - number of indices on this processor in result (ignored for 1 processor) or

use PETSC_DECIDE

Output Parameter:

  • isout - the inverse permutation

Level: intermediate

See also: IS, ISGetInfo(), ISSetPermutation(), ISGetPermutation()

External Links

source
PETSc.LibPETSc.ISListToPair — Method
xis::IS,yis::IS = ISListToPair(petsclib::PetscLibType, comm::MPI_Comm, listlen::PetscInt, islist::Vector{<:AbstractIS})

Convert an IS list to a pair of IS of equal length defining an equivalent integer multimap. Each IS in islist is assigned an integer j so that all of the indices of that IS are mapped to j.

Collective

Input Parameters:

  • comm - MPI_Comm
  • listlen - IS list length
  • islist - IS list

Output Parameters:

  • xis - domain IS
  • yis - range IS

Level: developer

See also: IS, ISPairToList()

External Links

source
PETSc.LibPETSc.ISLoad — Method
ISLoad(petsclib::PetscLibType, is::AbstractIS, viewer::PetscViewer)

Loads an index set that has been stored in binary or HDF5 format with ISView().

Collective

Input Parameters:

  • is - the newly loaded index set, this needs to have been created with ISCreate() or some related function before a call to ISLoad().
  • viewer - binary file viewer, obtained from PetscViewerBinaryOpen() or HDF5 file viewer, obtained from PetscViewerHDF5Open()

Level: intermediate

See also: IS, PetscViewerBinaryOpen(), ISView(), MatLoad(), VecLoad()

External Links

source
PETSc.LibPETSc.ISLocate — Method
location::PetscInt = ISLocate(petsclib::PetscLibType, is::AbstractIS, key::PetscInt)

determine the location of an index within the local component of an index set

Not Collective

Input Parameters:

  • is - the index set
  • key - the search key

Output Parameter:

  • location - if >= 0, a location within the index set that is equal to the key, otherwise the key is not in the index set

Level: intermediate

See also: IS

External Links

source
PETSc.LibPETSc.ISOnComm — Method
newis::IS = ISOnComm(petsclib::PetscLibType, is::AbstractIS, comm::MPI_Comm, mode::PetscCopyMode)

Split a parallel IS on subcomms (usually self) or concatenate index sets on subcomms into a parallel index set

Collective

Input Parameters:

  • is - index set
  • comm - communicator for new index set
  • mode - copy semantics, PETSC_USE_POINTER for no-copy if possible, otherwise PETSC_COPY_VALUES

Output Parameter:

  • newis - new IS on comm

Level: advanced

See also: IS

External Links

source
PETSc.LibPETSc.ISPairToList — Method
listlen::PetscInt,islist::IS = ISPairToList(petsclib::PetscLibType, xis::AbstractIS, yis::AbstractIS)

Convert an IS pair encoding an integer map to a list of IS.

Collective

Input Parameters:

  • xis - domain IS
  • yis - range IS, the maximum value must be less than PETSC_MPI_INT_MAX

Output Parameters:

  • listlen - length of islist
  • islist - list of ISs breaking up indices by color

Level: developer

See also: IS, ISListToPair()

External Links

source
PETSc.LibPETSc.ISPartitioningCount — Method
ISPartitioningCount(petsclib::PetscLibType, part::AbstractIS, len::PetscInt, count::Vector{PetscInt})

Takes a IS that represents a partitioning (the MPI rank that each local entry belongs to) and determines the number of resulting elements on each (partition) rank

Collective

Input Parameters:

  • part - a partitioning as generated by MatPartitioningApply() or MatPartitioningApplyND()
  • len - length of the array count, this is the total number of partitions

Output Parameter:

  • count - array of length size, to contain the number of elements assigned

to each partition, where size is the number of partitions generated (see notes below).

Level: advanced

See also: IS, MatPartitioningCreate(), AOCreateBasic(), ISPartitioningToNumbering(), MatPartitioningSetNParts(), MatPartitioningApply(), MatPartitioningApplyND()

External Links

source
PETSc.LibPETSc.ISPartitioningToNumbering — Method
is::IS = ISPartitioningToNumbering(petsclib::PetscLibType, part::AbstractIS)

Takes an IS' that represents a partitioning (the MPI rank that each local entry belongs to) and on each MPI process generates anIS` that contains a new global node number in the new ordering for each entry

Collective

Input Parameter:

  • part - a partitioning as generated by MatPartitioningApply() or MatPartitioningApplyND()

Output Parameter:

  • is - on each processor the index set that defines the global numbers

(in the new numbering) for all the nodes currently (before the partitioning) on that processor

Level: advanced

See also: IS, MatPartitioningCreate(), AOCreateBasic(), ISPartitioningCount()

External Links

source
PETSc.LibPETSc.ISPermutation — Method
perm::PetscBool = ISPermutation(petsclib::PetscLibType, is::AbstractIS)

PETSC_TRUE or PETSC_FALSE depending on whether the index set has been declared to be a permutation.

Logically Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • perm - PETSC_TRUE if a permutation, else PETSC_FALSE

Level: intermediate

See also: IS, ISSetPermutation(), ISGetInfo()

External Links

source
PETSc.LibPETSc.ISRegister — Method
ISRegister(petsclib::PetscLibType, sname::String, fnc::external)

Adds a new index set implementation

Not Collective, No Fortran Support

Input Parameters:

  • sname - The name of a new user-defined creation routine
  • function - The creation routine itself

See also: IS, ISType, ISSetType(), ISRegisterAll(), ISRegisterDestroy()

External Links

source
PETSc.LibPETSc.ISRenumber — Method
N::PetscInt,subset_n::IS = ISRenumber(petsclib::PetscLibType, subset::AbstractIS, subset_mult::AbstractIS)

Renumbers the non-negative entries of an index set in a contiguous way, starting from 0.

Collective

Input Parameters:

  • subset - the index set
  • subset_mult - the multiplicity of each entry in subset (optional, can be NULL)

Output Parameters:

  • N - one past the largest entry of the new IS
  • subset_n - the new IS

Level: intermediate

See also: IS

External Links

source
PETSc.LibPETSc.ISRestoreIndices — Method
ISRestoreIndices(petsclib::PetscLibType, is::AbstractIS, ptr::Union{Ptr, AbstractArray{PetscInt}})

Restores an index set to a usable state after a call to ISGetIndices().

Not Collective

Input Parameters:

  • is - the index set
  • ptr - the pointer obtained by ISGetIndices()

Level: intermediate

See also: IS, ISGetIndices()

External Links

source
PETSc.LibPETSc.ISRestoreNonlocalIS — Method
ISRestoreNonlocalIS(petsclib::PetscLibType, is::AbstractIS, complement::AbstractIS)

Restore the IS obtained with ISGetNonlocalIS().

Not collective.

Input Parameters:

  • is - the index set
  • complement - index set of is's nonlocal indices

Level: intermediate

See also: IS, ISGetNonlocalIS(), ISGetNonlocalIndices(), ISRestoreNonlocalIndices()

External Links

source
PETSc.LibPETSc.ISRestoreNonlocalIndices — Method
ISRestoreNonlocalIndices(petsclib::PetscLibType, is::AbstractIS, indices::Union{Ptr, AbstractArray{PetscInt}})

Restore the index array obtained with ISGetNonlocalIndices().

Not Collective.

Input Parameters:

  • is - the index set
  • indices - index array; must be the array obtained with ISGetNonlocalIndices()

Level: intermediate

See also: IS, ISGetTotalIndices(), ISGetNonlocalIndices(), ISRestoreTotalIndices()

External Links

source
PETSc.LibPETSc.ISRestorePointRange — Method
ISRestorePointRange(petsclib::PetscLibType, pointIS::AbstractIS, pStart::PetscInt, pEnd::PetscInt, points::Union{Ptr, AbstractArray{PetscInt}})

Destroys the traversal description created with ISGetPointRange()

Not Collective

Input Parameters:

  • pointIS - The IS object
  • pStart - The first index, from ISGetPointRange()
  • pEnd - One past the last index, from ISGetPointRange()
  • points - The indices, from ISGetPointRange()

Level: intermediate

See also: IS, ISGetPointRange(), ISGetPointSubrange(), ISGetIndices(), ISCreateStride()

External Links

source
PETSc.LibPETSc.ISRestoreTotalIndices — Method
ISRestoreTotalIndices(petsclib::PetscLibType, is::AbstractIS, indices::Union{Ptr, AbstractArray{PetscInt}})

Restore the index array obtained with ISGetTotalIndices().

Not Collective.

Input Parameters:

  • is - the index set
  • indices - index array; must be the array obtained with ISGetTotalIndices()

Level: intermediate

See also: IS, ISGetNonlocalIndices()

External Links

source
PETSc.LibPETSc.ISSetBlockSize — Method
ISSetBlockSize(petsclib::PetscLibType, is::AbstractIS, bs::PetscInt)

informs an index set that it has a given block size

Logicall Collective

Input Parameters:

  • is - index set
  • bs - block size

Level: intermediate

See also: IS, ISGetBlockSize(), ISCreateBlock(), ISBlockGetIndices()

External Links

source
PETSc.LibPETSc.ISSetCompressOutput — Method
ISSetCompressOutput(petsclib::PetscLibType, is::AbstractIS, compress::PetscBool)

set the flag for output compression

Logicall Collective

Input Parameters:

  • is - index set
  • compress - flag for output compression

Level: intermediate

See also: IS, ISGetCompressOutput(), ISView()

External Links

source
PETSc.LibPETSc.ISSetIdentity — Method
ISSetIdentity(petsclib::PetscLibType, is::AbstractIS)

Informs the index set that it is an identity.

Logically Collective

Input Parameter:

  • is - the index set

Level: intermediate

See also: IS, ISIdentity(), ISSetInfo(), ISClearInfoCache()

External Links

source
PETSc.LibPETSc.ISSetInfo — Method
ISSetInfo(petsclib::PetscLibType, is::AbstractIS, info::ISInfo, type::ISInfoType, permanent::PetscBool, flg::PetscBool)

Set known information about an index set.

Logically Collective if ISInfoType is IS_GLOBAL

Input Parameters:

  • is - the index set
  • info - describing a property of the index set, one of those listed below,
  • type - IS_LOCAL if the information describes the local portion of the index set,

IS_GLOBAL if it describes the whole index set

  • permanent - PETSC_TRUE if it is known that the property will persist through changes to the index set, PETSC_FALSE otherwise

If the user sets a property as permanently known, it will bypass computation of that property

  • flg - set the described property as true (PETSC_TRUE) or false (PETSC_FALSE)

Values of info Describing IS Structure:

  • IS_SORTED - the [local part of the] index set is sorted in ascending order
  • IS_UNIQUE - each entry in the [local part of the] index set is unique
  • IS_PERMUTATION - the [local part of the] index set is a permutation of the integers {0, 1, ..., N-1}, where N is the size of the [local part of the] index set
  • IS_INTERVAL - the [local part of the] index set is equal to a contiguous range of integers {f, f + 1, ..., f + N-1}
  • IS_IDENTITY - the [local part of the] index set is equal to the integers {0, 1, ..., N-1}

Level: advanced

See also: ISInfo, ISInfoType, IS

External Links

source
PETSc.LibPETSc.ISSetLayout — Method
ISSetLayout(petsclib::PetscLibType, is::AbstractIS, map::PetscLayout)

set PetscLayout describing index set layout

Collective

Input Parameters:

  • is - the index set
  • map - the layout

Level: developer

See also: IS, PetscLayout, ISCreate(), ISGetLayout(), ISGetSize(), ISGetLocalSize()

External Links

source
PETSc.LibPETSc.ISSetPermutation — Method
ISSetPermutation(petsclib::PetscLibType, is::AbstractIS)

Informs the index set that it is a permutation.

Logically Collective

Input Parameter:

  • is - the index set

Level: intermediate

See also: IS, ISPermutation(), ISSetInfo(), ISClearInfoCache().

External Links

source
PETSc.LibPETSc.ISSetType — Method
ISSetType(petsclib::PetscLibType, is::AbstractIS, method::String)

Builds a index set, for a particular ISType

Collective

Input Parameters:

  • is - The index set object
  • method - The name of the index set type

Options Database Key:

  • -is_type type - Sets the index set type; see ISType

Level: intermediate

See also: IS, ISGENERAL, ISBLOCK, ISGetType(), ISCreate(), ISCreateGeneral(), ISCreateStride(), ISCreateBlock()

External Links

source
PETSc.LibPETSc.ISShift — Method
ISShift(petsclib::PetscLibType, is::AbstractIS, offset::PetscInt, isy::AbstractIS)

Shift all indices by given offset

Collective

Input Parameters:

  • is - the index set
  • offset - the offset

Output Parameter:

  • isy - the shifted copy of the input index set

Level: beginner

See also: ISDuplicate(), ISCopy()

External Links

source
PETSc.LibPETSc.ISSort — Method
ISSort(petsclib::PetscLibType, is::AbstractIS)

Sorts the indices of an index set.

Collective

Input Parameter:

  • is - the index set

Level: intermediate

See also: IS, ISSortRemoveDups(), ISSorted()

External Links

source
PETSc.LibPETSc.ISSortPermutation — Method
h::IS = ISSortPermutation(petsclib::PetscLibType, f::AbstractIS, always::PetscBool)

calculate the permutation of the indices into a nondecreasing order.

Not Collective

Input Parameters:

  • f - IS to sort
  • always - build the permutation even when f's indices are nondecreasing.

Output Parameter:

  • h - permutation or NULL, if f is nondecreasing and always == PETSC_FALSE.

Level: advanced

See also: IS, ISLocalToGlobalMapping, ISSort()

External Links

source
PETSc.LibPETSc.ISSortRemoveDups — Method
ISSortRemoveDups(petsclib::PetscLibType, is::AbstractIS)

Sorts the indices of an index set, removing duplicates.

Collective

Input Parameter:

  • is - the index set

Level: intermediate

See also: IS, ISSort(), ISSorted()

External Links

source
PETSc.LibPETSc.ISSorted — Method
flg::PetscBool = ISSorted(petsclib::PetscLibType, is::AbstractIS)

Checks the indices to determine whether they have been sorted.

Not Collective

Input Parameter:

  • is - the index set

Output Parameter:

  • flg - output flag, either PETSC_TRUE if the index set is sorted,

or PETSC_FALSE otherwise.

Level: intermediate

See also: ISSort(), ISSortRemoveDups()

External Links

source
PETSc.LibPETSc.ISStrideGetInfo — Method
first::PetscInt,step::PetscInt = ISStrideGetInfo(petsclib::PetscLibType, is::AbstractIS)

Returns the first index in a stride index set and the stride width from an IS of ISType ISSTRIDE

Not Collective

Input Parameter:

  • is - the index set

Output Parameters:

  • first - the first index
  • step - the stride width

Level: intermediate

See also: IS, ISCreateStride(), ISGetSize(), ISSTRIDE

External Links

source
PETSc.LibPETSc.ISStrideSetStride — Method
ISStrideSetStride(petsclib::PetscLibType, is::AbstractIS, n::PetscInt, first::PetscInt, step::PetscInt)

Sets the stride information for a stride index set.

Logically Collective

Input Parameters:

  • is - the index set
  • n - the length of the locally owned portion of the index set
  • first - the first element of the locally owned portion of the index set
  • step - the change to the next index

Level: beginner

See also: IS, ISCreateGeneral(), ISCreateBlock(), ISAllGather(), ISSTRIDE, ISCreateStride(), ISStrideGetInfo()

External Links

source
PETSc.LibPETSc.ISSum — Method
is3::IS = ISSum(petsclib::PetscLibType, is1::AbstractIS, is2::AbstractIS)

Computes the sum (union) of two index sets.

Only sequential version (at the moment)

Input Parameters:

  • is1 - index set to be extended
  • is2 - index values to be added

Output Parameter:

  • is3 - the sum; this can not be is1 or is2

Level: intermediate

See also: IS, ISDestroy(), ISView(), ISDifference(), ISExpand()

External Links

source
PETSc.LibPETSc.ISToGeneral — Method
ISToGeneral(petsclib::PetscLibType, is::AbstractIS)

Converts an IS object of any type to ISGENERAL type

Collective

Input Parameter:

  • is - the index set

Level: intermediate

See also: IS, ISSorted()

External Links

source
PETSc.LibPETSc.ISView — Method
ISView(petsclib::PetscLibType, is::AbstractIS, viewer::PetscViewer)

Displays an index set.

Collective

Input Parameters:

  • is - the index set
  • viewer - viewer used to display the set, for example PETSC_VIEWER_STDOUT_SELF.

Level: intermediate

See also: IS, PetscViewer, PetscViewerASCIIOpen(), ISViewFromOptions()

External Links

source
PETSc.LibPETSc.ISViewFromOptions — Method
ISViewFromOptions(petsclib::PetscLibType, A::AbstractIS, obj, name::String)

View an IS based on options in the options database

Collective

Input Parameters:

  • A - the index set
  • obj - Optional object that provides the prefix for the options database
  • name - command line option

Options Database Key:

  • -name [viewertype][:...] - option name and values. See PetscObjectViewFromOptions() for the possible arguments

Level: intermediate

See also: IS, ISView(), PetscObjectViewFromOptions(), ISCreate()

External Links

source

IS Add-ons

Additional IS utilities and helper functions:

PETSc.LibPETSc.ISColoringCreate — Method
iscoloring::ISColoring = ISColoringCreate(petsclib::PetscLibType, comm::MPI_Comm, ncolors::PetscInt, n::PetscInt, colors::Vector{ISColoringValue}, mode::PetscCopyMode)

Generates an ISColoring context from lists (provided by each MPI process) of colors for each node.

Collective

Input Parameters:

  • comm - communicator for the processors creating the coloring
  • ncolors - max color value
  • n - number of nodes on this processor
  • colors - array containing the colors for this MPI rank, color numbers begin at 0, for each local node
  • mode - see PetscCopyMode for meaning of this flag.

Output Parameter:

  • iscoloring - the resulting coloring data structure

Options Database Key:

  • -is_coloring_view - Activates ISColoringView()

Level: advanced

See also: ISColoring, ISColoringValue, MatColoringCreate(), ISColoringView(), ISColoringDestroy(), ISColoringSetType()

External Links

source
PETSc.LibPETSc.ISColoringDestroy — Method
ISColoringDestroy(petsclib::PetscLibType, iscoloring::Union{ISColoring, Ref{ISColoring}})

Destroys an ISColoring coloring context.

Collective

Input Parameter:

  • iscoloring - the coloring context

Level: advanced

See also: ISColoring, ISColoringView(), MatColoring

External Links

source
PETSc.LibPETSc.ISColoringGetColors — Method
n::PetscInt, nc::PetscInt, colors::Vector{UInt16} = ISColoringGetColors(petsclib::PetscLibType, iscoloring::ISColoring)

Returns an array with the color for each local node

Not Collective

Input Parameter:

  • iscoloring - the coloring context

Output Parameters:

  • n - number of nodes (DOFs)
  • nc - number of colors
  • colors - copy of the color array (one UInt16 entry per DOF)

Level: advanced

See also: ISColoring, ISColoringValue, ISColoringRestoreIS(), ISColoringView(), ISColoringGetIS()

External Links

source
PETSc.LibPETSc.ISColoringGetIS — Method
nn::PetscInt,isis::Vector{IS} = ISColoringGetIS(petsclib::PetscLibType, iscoloring::ISColoring, mode::PetscCopyMode)

Extracts index sets from the coloring context. Each is contains the nodes of one color

Collective

Input Parameters:

  • iscoloring - the coloring context
  • mode - PETSC_OWN_POINTER hands the index sets to the caller; any other value leaves them with the coloring

Output Parameters:

  • nn - number of index sets in the coloring context
  • isis - array of index sets

With PETSC_OWN_POINTER each IS in isis is owned by the caller and must be released with ISDestroy() (or PETSc.destroy!); the C array that held them is freed here. With any other mode the index sets are borrowed: the coloring destroys them in ISColoringDestroy(), and destroying one here does nothing.

Level: advanced

See also: ISColoring, IS, ISColoringRestoreIS(), ISColoringView(), ISColoringGetColoring(), ISColoringGetColors()

External Links

source
PETSc.LibPETSc.ISColoringGetType — Method
type::ISColoringType = ISColoringGetType(petsclib::PetscLibType, coloring::ISColoring)

gets if the coloring is for the local representation (including ghost points) or the global representation

Collective

Input Parameter:

  • coloring - the coloring object

Output Parameter:

  • type - either IS_COLORING_LOCAL or IS_COLORING_GLOBAL

Level: intermediate

See also: MatFDColoringCreate(), ISColoring, ISColoringType, ISColoringCreate(), IS_COLORING_LOCAL, IS_COLORING_GLOBAL, ISColoringSetType()

External Links

source
PETSc.LibPETSc.ISColoringReference — Method
ISColoringReference(petsclib::PetscLibType, coloring::ISColoring)

Increases the reference count of an ISColoring object by one

Logically collective

Input Parameter:

  • coloring - the ISColoring object

Level: developer

See also: ISColoring, ISColoringCreate(), ISColoringDestroy()

External Links

source
PETSc.LibPETSc.ISColoringRestoreIS — Method
ISColoringRestoreIS(petsclib::PetscLibType, iscoloring::ISColoring, mode::PetscCopyMode, is::Union{Ptr, AbstractVector{<:AbstractIS}})

Restores the index sets extracted from the coloring context with ISColoringGetIS() using PETSC_USE_POINTER

Collective

Input Parameters:

  • iscoloring - the coloring context
  • mode - who retains ownership of the is
  • is - the index sets ISColoringGetIS() returned, or a pointer to a C array of them

Level: advanced

See also: ISColoring(), IS, ISColoringGetIS(), ISColoringView(), PetscCopyMode

External Links

source
PETSc.LibPETSc.ISColoringSetType — Method
ISColoringSetType(petsclib::PetscLibType, coloring::ISColoring, type::ISColoringType)

indicates if the coloring is for the local representation (including ghost points) or the global representation of a Mat

Collective

Input Parameters:

  • coloring - the coloring object
  • type - either IS_COLORING_LOCAL or IS_COLORING_GLOBAL

Level: intermediate

See also: MatFDColoringCreate(), ISColoring, ISColoringType, ISColoringCreate(), IS_COLORING_LOCAL, IS_COLORING_GLOBAL, ISColoringGetType()

External Links

source
PETSc.LibPETSc.ISColoringView — Method
ISColoringView(petsclib::PetscLibType, iscoloring::ISColoring, viewer::PetscViewer)

Views an ISColoring coloring context.

Collective

Input Parameters:

  • iscoloring - the coloring context
  • viewer - the viewer

Level: advanced

See also: ISColoring(), ISColoringViewFromOptions(), ISColoringDestroy(), ISColoringGetIS(), MatColoring

External Links

source
PETSc.LibPETSc.ISColoringViewFromOptions — Method
ISColoringViewFromOptions(petsclib::PetscLibType, obj::ISColoring, bobj, name::String)

Processes command line options to determine if/how an ISColoring object is to be viewed.

Collective

Input Parameters:

  • obj - the ISColoring object
  • bobj - prefix to use for viewing, or NULL to use prefix of mat
  • name - option to activate viewing

Options Database Key:

  • -name [viewertype][:...] - option name and values. See PetscObjectViewFromOptions() for the possible arguments

Level: intermediate

See also: ISColoring, ISColoringView(), PetscObjectViewFromOptions()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingApply — Method
out::Vector{PetscInt} = ISLocalToGlobalMappingApply(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, N::PetscInt, in::Vector{PetscInt})

Takes a list of integers in a local numbering and converts them to the global numbering.

Not Collective

Input Parameters:

  • mapping - the local to global mapping context
  • N - number of integers
  • in - input indices in local numbering

Output Parameter:

  • out - indices in global numbering

Level: advanced

See also: ISLocalToGlobalMapping, ISLocalToGlobalMappingApplyBlock(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingApplyIS(), AOCreateBasic(), AOApplicationToPetsc(), AOPetscToApplication(), ISGlobalToLocalMappingApply()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingApplyBlock — Method
out::Vector{PetscInt} = ISLocalToGlobalMappingApplyBlock(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, N::PetscInt, in::Vector{PetscInt})

Takes a list of integers in a local block numbering and converts them to the global block numbering

Not Collective

Input Parameters:

  • mapping - the local to global mapping context
  • N - number of integers
  • in - input indices in local block numbering

Output Parameter:

  • out - indices in global block numbering

Example: If the index values are {0,1,6,7} set with a call to ISLocalToGlobalMappingCreate(PETSC_COMM_SELF,2,2,{0,3}) then the mapping applied to 0 (the first block) would produce 0 and the mapping applied to 1 (the second block) would produce 3.

Level: advanced

See also: ISLocalToGlobalMappingApply(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingApplyIS(), AOCreateBasic(), AOApplicationToPetsc(), AOPetscToApplication(), ISGlobalToLocalMappingApply()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingApplyIS — Method
newis::IS = ISLocalToGlobalMappingApplyIS(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, is::AbstractIS)

Creates from an IS in the local numbering a new index set using the global numbering defined in an ISLocalToGlobalMapping context.

Collective

Input Parameters:

  • mapping - mapping between local and global numbering
  • is - index set in local numbering

Output Parameter:

  • newis - index set in global numbering

Level: advanced

See also: ISLocalToGlobalMappingApply(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingDestroy(), ISGlobalToLocalMappingApply()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingConcatenate — Method
ltogcat::ISLocalToGlobalMapping = ISLocalToGlobalMappingConcatenate(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, ltogs::Vector{ISLocalToGlobalMapping})

Create a new mapping that concatenates a list of mappings

Not Collective

Input Parameters:

  • comm - communicator for the new mapping, must contain the communicator of every mapping to concatenate
  • n - number of mappings to concatenate
  • ltogs - local to global mappings

Output Parameter:

  • ltogcat - new mapping

Level: advanced

See also: ISLocalToGlobalMapping, ISLocalToGlobalMappingCreate()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingCreate — Method
mapping::ISLocalToGlobalMapping = ISLocalToGlobalMappingCreate(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, n::PetscInt, indices::Vector{PetscInt}, mode::PetscCopyMode)

Creates a mapping between a local (0 to n) ordering and a global parallel ordering.

Not Collective, but communicator may have more than one process

Input Parameters:

  • comm - MPI communicator
  • bs - the block size
  • n - the number of local elements divided by the block size, or equivalently the number of block indices
  • indices - the global index for each local element, these do not need to be in increasing order (sorted), these values should not be scaled (i.e. multiplied) by the blocksize bs
  • mode - see PetscCopyMode

Output Parameter:

  • mapping - new mapping data structure

Level: advanced

See also: ISLocalToGlobalMapping, ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingCreateIS(), ISLocalToGlobalMappingSetFromOptions(), ISLOCALTOGLOBALMAPPINGBASIC, ISLOCALTOGLOBALMAPPINGHASH, ISLocalToGlobalMappingSetType(), ISLocalToGlobalMappingType

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingCreateIS — Method
mapping::ISLocalToGlobalMapping = ISLocalToGlobalMappingCreateIS(petsclib::PetscLibType, is::AbstractIS)

Creates a mapping between a local (0 to n) ordering and a global parallel ordering.

Not Collective

Input Parameter:

  • is - index set containing the global numbers for each local number

Output Parameter:

  • mapping - new mapping data structure

Level: advanced

See also: ISLocalToGlobalMapping, ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingSetFromOptions()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingCreateSF — Method
mapping::ISLocalToGlobalMapping = ISLocalToGlobalMappingCreateSF(petsclib::PetscLibType, sf::PetscSF, start::PetscInt)

Creates a mapping between a local (0 to n) ordering and a global parallel ordering induced by a star forest.

Collective

Input Parameters:

  • sf - star forest mapping contiguous local indices to (rank, offset)
  • start - first global index on this process, or PETSC_DECIDE to compute contiguous global numbering automatically

Output Parameter:

  • mapping - new mapping data structure

Level: advanced

See also: PetscSF, ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingCreateIS(), ISLocalToGlobalMappingSetFromOptions()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingDestroy — Method
ISLocalToGlobalMappingDestroy(petsclib::PetscLibType, mapping::Union{ISLocalToGlobalMapping, Ref{ISLocalToGlobalMapping}})

Destroys a mapping between a local (0 to n) ordering and a global parallel ordering.

Not Collective

Input Parameter:

  • mapping - mapping data structure

Level: advanced

See also: ISLocalToGlobalMapping, ISLocalToGlobalMappingCreate()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingDuplicate — Method
nltog::ISLocalToGlobalMapping = ISLocalToGlobalMappingDuplicate(petsclib::PetscLibType, ltog::ISLocalToGlobalMapping)

Duplicates the local to global mapping object

Not Collective

Input Parameter:

  • ltog - local to global mapping

Output Parameter:

  • nltog - the duplicated local to global mapping

Level: advanced

See also: ISLocalToGlobalMapping, ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingCreate()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingGetBlockIndices — Method
array::Vector{PetscInt} = ISLocalToGlobalMappingGetBlockIndices(petsclib::PetscLibType, ltog::ISLocalToGlobalMapping)

Get global indices for every local block in a ISLocalToGlobalMapping

Not Collective

Input Parameter:

  • ltog - local to global mapping

Output Parameter:

  • array - array of indices

Level: advanced

See also: ISLocalToGlobalMapping, ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingApply(), ISLocalToGlobalMappingRestoreBlockIndices()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingGetBlockInfo — Method
nproc::PetscInt,procs::Vector{PetscInt},numprocs::Vector{PetscInt},indices::Vector{Ptr{PetscInt}} = ISLocalToGlobalMappingGetBlockInfo(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping)

Gets the neighbor information

Collective the first time it is called

Input Parameter:

  • mapping - the mapping from local to global indexing

Output Parameters:

  • nproc - number of processes that are connected to the calling process
  • procs - neighboring processes
  • numprocs - number of block indices for each process
  • indices - block indices (in local numbering) shared with neighbors (sorted by global numbering)

Level: advanced

See also: ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingCreateIS(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingRestoreBlockInfo(), ISLocalToGlobalMappingGetBlockMultiLeavesSF()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingGetBlockMultiLeavesSF — Method
mlsf::PetscSF = ISLocalToGlobalMappingGetBlockMultiLeavesSF(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping)

Get the star-forest to communicate multi-leaf block data

Collective the first time it is called

Input Parameter:

  • mapping - the mapping from local to global indexing

Output Parameter:

  • mlsf - the PetscSF

Level: advanced

See also: ISLocalToGlobalMappingGetBlockNodeInfo(), PetscSF

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingGetBlockNodeInfo — Method
n::PetscInt,n_procs::Vector{PetscInt},procs::Vector{Ptr{PetscInt}} = ISLocalToGlobalMappingGetBlockNodeInfo(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping)

Gets the neighbor information for each local block index

Collective the first time it is called

Input Parameter:

  • mapping - the mapping from local to global indexing

Output Parameters:

  • n - number of local block nodes
  • n_procs - an array storing the number of processes for each local block node (including self)
  • procs - the processes' rank for each local block node (sorted, self is first)

Level: advanced

See also: ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingCreateIS(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingGetBlockInfo(), ISLocalToGlobalMappingRestoreBlockNodeInfo(), ISLocalToGlobalMappingGetNodeInfo()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingGetBlockSize — Method
bs::PetscInt = ISLocalToGlobalMappingGetBlockSize(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping)

Gets the blocksize of the mapping ordering and a global parallel ordering.

Not Collective

Input Parameter:

  • mapping - mapping data structure

Output Parameter:

  • bs - the blocksize

Level: advanced

See also: ISLocalToGlobalMapping, ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingCreateIS()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingGetIndices — Method
array::Vector{PetscInt} = ISLocalToGlobalMappingGetIndices(petsclib::PetscLibType, ltog::ISLocalToGlobalMapping)

Get global indices for every local point that is mapped

Not Collective

Input Parameter:

  • ltog - local to global mapping

Output Parameter:

  • array - array of indices, the length of this array may be obtained with ISLocalToGlobalMappingGetSize()

Level: advanced

See also: ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingApply(), ISLocalToGlobalMappingRestoreIndices(), ISLocalToGlobalMappingGetBlockIndices(), ISLocalToGlobalMappingRestoreBlockIndices()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingGetInfo — Method
nproc::PetscInt,procs::Vector{PetscInt},numprocs::Vector{PetscInt},indices::Vector{Ptr{PetscInt}} = ISLocalToGlobalMappingGetInfo(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping)

Gets the neighbor information for each process

Collective the first time it is called

Input Parameter:

  • mapping - the mapping from local to global indexing

Output Parameters:

  • nproc - number of processes that are connected to the calling process
  • procs - neighboring processes
  • numprocs - number of indices for each process
  • indices - indices (in local numbering) shared with neighbors (sorted by global numbering)

Level: advanced

See also: ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingCreateIS(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingRestoreInfo(), ISLocalToGlobalMappingGetNodeInfo()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingGetNodeInfo — Method
n::PetscInt,n_procs::Vector{PetscInt},procs::Vector{Ptr{PetscInt}} = ISLocalToGlobalMappingGetNodeInfo(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping)

Gets the neighbor information of local nodes

Collective the first time it is called

Input Parameter:

  • mapping - the mapping from local to global indexing

Output Parameters:

  • n - number of local nodes
  • n_procs - an array storing the number of processes for each local node (including self)
  • procs - the processes' rank for each local node (sorted, self is first)

Level: advanced

See also: ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingCreateIS(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingGetInfo(), ISLocalToGlobalMappingRestoreNodeInfo(), ISLocalToGlobalMappingGetBlockNodeInfo()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingGetSize — Method
n::PetscInt = ISLocalToGlobalMappingGetSize(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping)

Gets the local size of a local to global mapping

Not Collective

Input Parameter:

  • mapping - local to global mapping

Output Parameter:

  • n - the number of entries in the local mapping, ISLocalToGlobalMappingGetIndices() returns an array of this length

Level: advanced

See also: ISLocalToGlobalMapping, ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingCreate()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingGetType — Method
type::String = ISLocalToGlobalMappingGetType(petsclib::PetscLibType, ltog::ISLocalToGlobalMapping)

Get the type of the ISLocalToGlobalMapping

Not Collective

Input Parameter:

  • ltog - the ISLocalToGlobalMapping object

Output Parameter:

  • type - the type

Level: intermediate

See also: ISLocalToGlobalMappingType, ISLocalToGlobalMappingRegister(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingSetType(), PetscObjectTypeCompare(), PetscObjectTypeCompareAny()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingLoad — Method
ISLocalToGlobalMappingLoad(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, viewer::PetscViewer)

Loads a local-to-global mapping that has been stored in binary format.

Collective on viewer

Input Parameters:

  • mapping - the newly loaded map, this needs to have been created with ISLocalToGlobalMappingCreate() or some related function before a call to ISLocalToGlobalMappingLoad()
  • viewer - binary file viewer, obtained from PetscViewerBinaryOpen()

Level: intermediate

See also: PetscViewer, ISLocalToGlobalMapping, ISLocalToGlobalMappingView(), ISLocalToGlobalMappingCreate()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingRegister — Method
ISLocalToGlobalMappingRegister(petsclib::PetscLibType, sname::String, fnc::external)

Registers a method for applying a global to local mapping with an ISLocalToGlobalMapping

Not Collective, No Fortran Support

Input Parameters:

  • sname - name of a new method
  • function - routine to create method context

See also: ISLocalToGlobalMappingRegisterAll(), ISLocalToGlobalMappingRegisterDestroy(), ISLOCALTOGLOBALMAPPINGBASIC, ISLOCALTOGLOBALMAPPINGHASH, ISLocalToGlobalMapping, ISLocalToGlobalMappingApply()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingRestoreBlockIndices — Method
ISLocalToGlobalMappingRestoreBlockIndices(petsclib::PetscLibType, ltog::ISLocalToGlobalMapping, array::Union{Ptr, AbstractArray{PetscInt}})

Restore indices obtained with ISLocalToGlobalMappingGetBlockIndices()

Not Collective

Input Parameters:

  • ltog - local to global mapping
  • array - array of indices

Level: advanced

See also: ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingApply(), ISLocalToGlobalMappingGetIndices()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingRestoreBlockInfo — Method
ISLocalToGlobalMappingRestoreBlockInfo(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, nproc::PetscInt, procs::Union{Ptr, AbstractArray{PetscInt}}, numprocs::Union{Ptr, AbstractArray{PetscInt}}, indices::Vector{PetscInt})

Frees the memory allocated by ISLocalToGlobalMappingGetBlockInfo()

Not Collective

Input Parameters:

  • mapping - the mapping from local to global indexing
  • nproc - number of processes that are connected to the calling process
  • procs - neighboring processes
  • numprocs - number of block indices for each process
  • indices - block indices (in local numbering) shared with neighbors (sorted by global numbering)

Level: advanced

See also: ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingCreateIS(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingGetInfo()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingRestoreBlockNodeInfo — Method
ISLocalToGlobalMappingRestoreBlockNodeInfo(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, n::PetscInt, n_procs::Union{Ptr, AbstractArray{PetscInt}}, procs::Vector{PetscInt})

Frees the memory allocated by ISLocalToGlobalMappingGetBlockNodeInfo()

Not Collective

Input Parameters:

  • mapping - the mapping from local to global indexing
  • n - number of local block nodes
  • n_procs - an array storing the number of processes for each local block nodes (including self)
  • procs - the processes' rank for each local block node (sorted, self is first)

Level: advanced

See also: ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingCreateIS(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingGetBlockNodeInfo()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingRestoreIndices — Method
ISLocalToGlobalMappingRestoreIndices(petsclib::PetscLibType, ltog::ISLocalToGlobalMapping, array::Union{Ptr, AbstractArray{PetscInt}})

Restore indices obtained with ISLocalToGlobalMappingGetIndices()

Not Collective

Input Parameters:

  • ltog - local to global mapping
  • array - array of indices

Level: advanced

See also: ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingApply(), ISLocalToGlobalMappingGetIndices()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingRestoreInfo — Method
ISLocalToGlobalMappingRestoreInfo(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, nproc::PetscInt, procs::Union{Ptr, AbstractArray{PetscInt}}, numprocs::Union{Ptr, AbstractArray{PetscInt}}, indices::Vector{PetscInt})

Frees the memory allocated by ISLocalToGlobalMappingGetInfo()

Not Collective

Input Parameters:

  • mapping - the mapping from local to global indexing
  • nproc - number of processes that are connected to the calling process
  • procs - neighboring processes
  • numprocs - number of indices for each process
  • indices - indices (in local numbering) shared with neighbors (sorted by global numbering)

Level: advanced

See also: ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingCreateIS(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingGetInfo()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingRestoreNodeInfo — Method
ISLocalToGlobalMappingRestoreNodeInfo(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, n::PetscInt, n_procs::Union{Ptr, AbstractArray{PetscInt}}, procs::Vector{PetscInt})

Frees the memory allocated by ISLocalToGlobalMappingGetNodeInfo()

Not Collective

Input Parameters:

  • mapping - the mapping from local to global indexing
  • n - number of local nodes
  • n_procs - an array storing the number of processes for each local node (including self)
  • procs - the processes' rank for each local node (sorted, self is first)

Level: advanced

See also: ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingCreateIS(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingGetInfo()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingSetBlockSize — Method
ISLocalToGlobalMappingSetBlockSize(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, bs::PetscInt)

Sets the blocksize of the mapping

Not Collective

Input Parameters:

  • mapping - mapping data structure
  • bs - the blocksize

Level: advanced

See also: ISLocalToGlobalMapping, ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingCreateIS()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingSetFromOptions — Method
ISLocalToGlobalMappingSetFromOptions(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping)

Set mapping options from the options database.

Not Collective

Input Parameter:

  • mapping - mapping data structure

Options Database Key:

  • -islocaltoglobalmapping_type (basic|hash) - nonscalable and scalable versions

Level: advanced

See also: ISLocalToGlobalMapping, ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingCreateIS(), ISLOCALTOGLOBALMAPPINGBASIC, ISLOCALTOGLOBALMAPPINGHASH, ISLocalToGlobalMappingSetType(), ISLocalToGlobalMappingType

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingSetType — Method
ISLocalToGlobalMappingSetType(petsclib::PetscLibType, ltog::ISLocalToGlobalMapping, type::String)

Sets the implementation type ISLocalToGlobalMapping will use

Logically Collective

Input Parameters:

  • ltog - the ISLocalToGlobalMapping object
  • type - a known method

Options Database Key:

  • -islocaltoglobalmapping_type (basic|hash) - Sets the method used for applying the mapping, see ISLocalToGlobalMappingType

Level: intermediate

See also: ISLocalToGlobalMappingType, ISLocalToGlobalMappingRegister(), ISLocalToGlobalMappingCreate(), ISLocalToGlobalMappingGetType()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingView — Method
ISLocalToGlobalMappingView(petsclib::PetscLibType, mapping::ISLocalToGlobalMapping, viewer::PetscViewer)

View a local to global mapping

Collective on viewer

Input Parameters:

  • mapping - local to global mapping
  • viewer - viewer

Level: intermediate

See also: PetscViewer, ISLocalToGlobalMapping, ISLocalToGlobalMappingDestroy(), ISLocalToGlobalMappingCreate()

External Links

source
PETSc.LibPETSc.ISLocalToGlobalMappingViewFromOptions — Method
ISLocalToGlobalMappingViewFromOptions(petsclib::PetscLibType, A::ISLocalToGlobalMapping, obj, name::String)

View an ISLocalToGlobalMapping based on values in the options database

Collective

Input Parameters:

  • A - the local to global mapping object
  • obj - Optional object that provides the options prefix used for the options database query
  • name - command line option

Options Database Key:

  • -name [viewertype][:...] - option name and values. See PetscObjectViewFromOptions() for the possible arguments

Level: intermediate

See also: PetscViewer, ISLocalToGlobalMapping, ISLocalToGlobalMappingView, PetscObjectViewFromOptions(), ISLocalToGlobalMappingCreate()

External Links

source