VecTaggerCreate#

create a VecTagger context. This object is used to control the tagging/selection of index sets based on the values in a vector. This is used, for example, in adaptive simulations when aspects are selected for refinement or coarsening. The primary intent is that the selected index sets are based purely on the values in the vector, though implementations that do not follow this intent are possible.

Synopsis#

#include "petscvec.h" 
PetscErrorCode VecTaggerCreate(MPI_Comm comm, VecTagger *tagger)

Once a VecTagger is created (VecTaggerCreate()), optionally modified by options (VecTaggerSetFromOptions()), and set up (VecTaggerSetUp()), it is applied to vectors with VecTaggerComputeIS() to compute the selected index sets.

In many cases, the selection criteria for an index is whether the corresponding value falls within a collection of boxes: for this common case, VecTaggerCreateBoxes() can also be used to determine those boxes.

Provided implementations support tagging based on a box/interval of values (VECTAGGERABSOLUTE), based on a box of values of relative to the range of values present in the vector (VECTAGGERRELATIVE), based on where values fall in the cumulative distribution of values in the vector (VECTAGGERCDF), and based on unions (VECTAGGEROR) or intersections (VECTAGGERAND) of other criteria.

Collective

Input Parameter#

  • comm - communicator on which the VecTagger will operate

Output Parameter#

  • tagger - new Vec tagger context

See Also#

VecTagger, VecTaggerSetBlockSize(), VecTaggerSetFromOptions(), VecTaggerSetUp(), VecTaggerComputeIS(), VecTaggerComputeBoxes(), VecTaggerDestroy()

Level#

advanced

Location#

src/vec/vec/utils/tagger/interface/tagger.c

Examples#

src/ts/tutorials/ex11.c
src/vec/vec/utils/tagger/tutorials/ex1.c

Implementations#

VecTaggerCreate_Absolute in src/vec/vec/utils/tagger/impls/absolute.c
VecTaggerCreate_And in src/vec/vec/utils/tagger/impls/and.c
VecTaggerCreate_AndOr in src/vec/vec/utils/tagger/impls/andor.c
VecTaggerCreate_CDF in src/vec/vec/utils/tagger/impls/cdf.c
VecTaggerCreate_Or in src/vec/vec/utils/tagger/impls/or.c
VecTaggerCreate_Relative in src/vec/vec/utils/tagger/impls/relative.c
VecTaggerCreate_Simple in src/vec/vec/utils/tagger/impls/simple.c


Edit on GitLab

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