Advanced Multi-Physics (AMP)
On-Line Documentation
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
AMP::LinearAlgebra::VS_Mesh Class Reference

Create a subset based on a mesh. More...

#include <VectorSelector.h>

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

Public Member Functions

virtual AMP_MPI communicator (const Vector &vec) const override
 Returns the communicator for the subset.
 
virtual bool isSelected (const Vector &v) const override
 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 override
 Subset the given vector.
 
virtual std::shared_ptr< Vectorsubset (std::shared_ptr< Vector > vec) const=0
 Subset the given vector.
 
 VS_Mesh (std::shared_ptr< const AMP::Mesh::Mesh > mesh, bool useMeshComm=true)
 Constructor.
 

Static Public Member Functions

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

Protected Attributes

std::shared_ptr< const AMP::Mesh::Meshd_mesh
 
bool d_useMeshComm
 

Detailed Description

Create a subset based on a mesh.

This will select the portion of a vector that is on the given mesh

Definition at line 177 of file VectorSelector.h.

Constructor & Destructor Documentation

◆ VS_Mesh()

AMP::LinearAlgebra::VS_Mesh::VS_Mesh ( std::shared_ptr< const AMP::Mesh::Mesh mesh,
bool  useMeshComm = true 
)
explicit

Constructor.

Parameters
[in]meshThe desired mesh
[in]useMeshCommUse the comm of the mesh (otherwise use the comm of the parent DOFManager)

Member Function Documentation

◆ communicator()

virtual AMP_MPI AMP::LinearAlgebra::VS_Mesh::communicator ( const Vector vec) const
overridevirtual

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 from AMP::LinearAlgebra::VectorSelector.

◆ create()

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

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::VS_Mesh::isSelected ( const Vector vec) const
overridevirtual

Returns true if Vector grossly matches a selection condition.

Parameters
[in]vecThe Vector to match

Base class defaults to accepting all vectors.

Implements AMP::LinearAlgebra::VectorSelector.

◆ subset() [1/3]

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

Subset the given vector.

Parameters
[in]vecThe Vector to subset

Base class defaults to returning all data in the vector

Implements AMP::LinearAlgebra::VectorSelector.

◆ subset() [2/3]

virtual std::shared_ptr< Vector > AMP::LinearAlgebra::VS_Mesh::subset ( std::shared_ptr< Vector vec) const
overridevirtual

Subset the given vector.

Parameters
[in]vecThe Vector to subset

Base class defaults to returning all data in the vector

Implements AMP::LinearAlgebra::VectorSelector.

◆ subset() [3/3]

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

Subset the given vector.

Parameters
[in]vecThe Vector to subset

Base class defaults to returning all data in the vector

Implements AMP::LinearAlgebra::VectorSelector.

Member Data Documentation

◆ d_mesh

std::shared_ptr<const AMP::Mesh::Mesh> AMP::LinearAlgebra::VS_Mesh::d_mesh
protected

Definition at line 195 of file VectorSelector.h.

◆ d_useMeshComm

bool AMP::LinearAlgebra::VS_Mesh::d_useMeshComm
protected

Definition at line 194 of file VectorSelector.h.


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