Advanced Multi-Physics (AMP)
On-Line Documentation
Public Member Functions | Static Public Member Functions | List of all members
AMP::LinearAlgebra::VectorSelector Class Referenceabstract

A class used by Vector::select and Vector::selectInto to create vectors with particular data. More...

#include <VectorSelector.h>

Inheritance diagram for AMP::LinearAlgebra::VectorSelector:
Inheritance graph
[legend]

Public Member Functions

virtual AMP_MPI communicator (const Vector &vec) const
 Returns the communicator for the subset.
 
virtual bool isSelected (const Vector &vec) const =0
 Returns true if Vector grossly matches a selection condition.
 
std::shared_ptr< const Vectorsubset (std::shared_ptr< const Vector > vec) const
 Subset the given vector.
 
virtual std::shared_ptr< Vectorsubset (std::shared_ptr< Vector > vec) const =0
 Subset the given vector.
 
virtual ~VectorSelector ()
 Virtual destructor.
 

Static Public Member Functions

static std::shared_ptr< VectorSelectorcreate (const std::vector< std::shared_ptr< VectorSelector > > &selectors)
 Create a VectorSelector.
 

Detailed Description

A class used by Vector::select and Vector::selectInto to create vectors with particular data.

VectorSelector is designed to perform two types of selection: gross and fine. The isSelected method will determine if a Vector should be considered for fine selection. The subset method can be used to create a fine subset of the Vector. These methods are meant to be used solely in Vector::selectInto(). Subclasses of Vector are encouraged to call Vector::selectInto() rather than use these methods.

Definition at line 21 of file VectorSelector.h.

Constructor & Destructor Documentation

◆ ~VectorSelector()

virtual AMP::LinearAlgebra::VectorSelector::~VectorSelector ( )
virtual

Virtual destructor.

Member Function Documentation

◆ communicator()

virtual AMP_MPI AMP::LinearAlgebra::VectorSelector::communicator ( const Vector vec) const
virtual

Returns the communicator for the subset.

Parameters
[in]vecThe Vector to match

This function will return the proper communicator given the current vector. For most subsetters, this will be the same communicator as the current vector, however some subsetters (MeshSelector) may opperate on a different (smaller) comm.

Reimplemented in AMP::LinearAlgebra::VS_Comm, and AMP::LinearAlgebra::VS_Mesh.

◆ create()

static std::shared_ptr< VectorSelector > AMP::LinearAlgebra::VectorSelector::create ( const std::vector< std::shared_ptr< VectorSelector > > &  selectors)
static

Create a VectorSelector.

Create a VectorSelector that applies a set of selectors which all must be met for the subset operation

Parameters
[in]selectorsA list of subsequent selectors to apply

◆ isSelected()

virtual bool AMP::LinearAlgebra::VectorSelector::isSelected ( const Vector vec) const
pure virtual

◆ subset() [1/2]

std::shared_ptr< const Vector > AMP::LinearAlgebra::VectorSelector::subset ( std::shared_ptr< const Vector vec) const

Subset the given vector.

Parameters
[in]vecThe Vector to subset

Base class defaults to returning all data in the vector

◆ subset() [2/2]

virtual std::shared_ptr< Vector > AMP::LinearAlgebra::VectorSelector::subset ( std::shared_ptr< Vector vec) const
pure virtual

The documentation for this class was generated from the following file:



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:43.
Comments on this page