#include <CommSelfVariable.h>

Public Member Functions | |
| std::string | className () const override |
| A function that returns the name of a variable. | |
| std::shared_ptr< Variable > | clone () const |
| Create a variable of the same type with a new name. | |
| virtual std::shared_ptr< Variable > | clone (const std::string &name) const |
| Create a variable of the same type with a new name. | |
| CommSelfVariable (const std::string &name) | |
| Constructor. | |
| CommSelfVariable (int64_t) | |
| std::shared_ptr< VectorSelector > | createVectorSelector () const override |
| Create a VectorSelector. | |
| AMP::AMP_MPI | getComm (const AMP::AMP_MPI &comm) const override |
| Return the comm for the subset. | |
| uint64_t | getID () const override |
| Get a unique id hash for the vector. | |
| auto & | getName () const |
| A function that returns the name of a variable. | |
| std::shared_ptr< AMP::Discretization::DOFManager > | getSubsetDOF (std::shared_ptr< AMP::Discretization::DOFManager >) const override |
| Return a DOFManager that describes the subset. | |
| virtual const Units & | getUnits () const |
| Get the units of this variable. | |
| bool | operator!= (const Variable &rhs) const |
| Inverse of ==. | |
| virtual bool | operator== (const Variable &rhs) const |
| Compares two variables for equality. | |
| virtual void | registerChildObjects (AMP::IO::RestartManager *manager) const |
| Register any child objects. | |
| virtual void | setUnits (const Units &u) |
| Set the units of this variable. | |
| std::shared_ptr< Variable > | shared_from_this () |
| std::shared_ptr< const Variable > | shared_from_this () const |
| virtual Vector::const_shared_ptr | view (Vector::const_shared_ptr) const |
| This vector is a subset of an AMP Vector. | |
| virtual Vector::shared_ptr | view (Vector::shared_ptr) const |
| This vector is a subset of an AMP Vector. | |
| Vector::shared_ptr | view (Vector::shared_ptr) const override |
| This vector is a subset of an AMP Vector. | |
| void | writeRestart (int64_t) const override |
| Write restart data to file. | |
Protected Attributes | |
| AMP::Units | d_Units |
| The units this variable is measured in. | |
| std::string | d_VariableName |
| A name given to the variable. | |
| std::weak_ptr< Variable > | weak_ptr_ |
Private Member Functions | |
| CommSelfVariable () | |
Definition at line 14 of file CommSelfVariable.h.
| AMP::LinearAlgebra::CommSelfVariable::CommSelfVariable | ( | const std::string & | name | ) |
Constructor.
| [in] | name | The name of the new variable |
| AMP::LinearAlgebra::CommSelfVariable::CommSelfVariable | ( | int64_t | ) |
|
private |
|
inlineoverridevirtual |
A function that returns the name of a variable.
This gives access to the name
Reimplemented from AMP::LinearAlgebra::Variable.
Definition at line 29 of file CommSelfVariable.h.
|
inherited |
Create a variable of the same type with a new name.
This function will create a "deep" copy of this variable.
|
virtualinherited |
Create a variable of the same type with a new name.
This function will create a "deep" copy of this variable.
Reimplemented in AMP::LinearAlgebra::MultiVariable.
|
overridevirtual |
Create a VectorSelector.
This function will create a VectorSelector that is able to subset a vector for the variable. This is used by Vector::subsetVectorForVariable which then calls Vector::selectInto.
Reimplemented from AMP::LinearAlgebra::Variable.
|
overridevirtual |
Return the comm for the subset.
| [in] | comm | The comm of the original vector / DOFManager |
Implements AMP::LinearAlgebra::SubsetVariable.
|
overridevirtual |
Get a unique id hash for the vector.
Reimplemented from AMP::LinearAlgebra::Variable.
|
inlineinherited |
A function that returns the name of a variable.
This gives access to the name
Definition at line 74 of file Variable.h.
References AMP::LinearAlgebra::Variable::d_VariableName.
|
overridevirtual |
Return a DOFManager that describes the subset.
| [in] | manager | The DOF manager we want to subset |
Implements AMP::LinearAlgebra::SubsetVariable.
|
virtualinherited |
Get the units of this variable.
|
inherited |
Inverse of ==.
This function performs an equality check and negates it.
| rhs | Variable to compare |
|
virtualinherited |
Compares two variables for equality.
This operation compares the names.
| rhs | Variable to compare |
Reimplemented in AMP::LinearAlgebra::MultiVariable.
|
virtualinherited |
Register any child objects.
This function will register child objects with the manager
| manager | Restart manager |
Reimplemented in AMP::LinearAlgebra::MultiVariable.
|
virtualinherited |
Set the units of this variable.
Reimplemented in AMP::LinearAlgebra::MultiVariable.
|
inlineinherited |
Definition at line 28 of file enable_shared_from_this.h.
|
inlineinherited |
Definition at line 46 of file enable_shared_from_this.h.
|
virtual |
This vector is a subset of an AMP Vector.
Given an AMP Vector, this will create a view of a subset of the vector. For instance, if \(\mathbf{a} = \{ a_0 a_1 a_2 \ldots a_n\}\), and \(S\) is a set of non-negative integers \(( s_0 s_1 \ldots s_m )\) such that \(0 \le s_i \le n\), then the SubsetVector will be the vector \(\mathbf{a}_S = \{ a_{s_0} a_{s_1} a_{s_2} \ldots a_{s_m}\} \).
Since this is a view, any change to vec2 will be reflected on vec1 and vice versa. vec2 is a sparse vector, with a mapping of new index to old. vec3, on the other hand, is a dense vector without an index. If a lot of computation is necessary on the sparse vector, the data can be copied in and out:
Reimplemented from AMP::LinearAlgebra::SubsetVariable.
|
virtual |
This vector is a subset of an AMP Vector.
Given an AMP Vector, this will create a view of a subset of the vector. For instance, if \(\mathbf{a} = \{ a_0 a_1 a_2 \ldots a_n\}\), and \(S\) is a set of non-negative integers \(( s_0 s_1 \ldots s_m )\) such that \(0 \le s_i \le n\), then the SubsetVector will be the vector \(\mathbf{a}_S = \{ a_{s_0} a_{s_1} a_{s_2} \ldots a_{s_m}\} \).
Since this is a view, any change to vec2 will be reflected on vec1 and vice versa. vec2 is a sparse vector, with a mapping of new index to old. vec3, on the other hand, is a dense vector without an index. If a lot of computation is necessary on the sparse vector, the data can be copied in and out:
Reimplemented from AMP::LinearAlgebra::SubsetVariable.
|
overridevirtual |
This vector is a subset of an AMP Vector.
Given an AMP Vector, this will create a view of a subset of the vector. For instance, if \(\mathbf{a} = \{ a_0 a_1 a_2 \ldots a_n\}\), and \(S\) is a set of non-negative integers \(( s_0 s_1 \ldots s_m )\) such that \(0 \le s_i \le n\), then the SubsetVector will be the vector \(\mathbf{a}_S = \{ a_{s_0} a_{s_1} a_{s_2} \ldots a_{s_m}\} \).
Since this is a view, any change to vec2 will be reflected on vec1 and vice versa. vec2 is a sparse vector, with a mapping of new index to old. vec3, on the other hand, is a dense vector without an index. If a lot of computation is necessary on the sparse vector, the data can be copied in and out:
Reimplemented from AMP::LinearAlgebra::SubsetVariable.
|
overridevirtual |
Write restart data to file.
This function will the variable to an HDF5 file
| fid | File identifier to write |
Reimplemented from AMP::LinearAlgebra::Variable.
|
protectedinherited |
The units this variable is measured in.
Definition at line 155 of file Variable.h.
|
protectedinherited |
A name given to the variable.
Variables have names for easy identification. For instance, some variables are called displacement, concentration, search direction, etc.
Definition at line 151 of file Variable.h.
Referenced by AMP::LinearAlgebra::Variable::getName().
|
mutableprotectedinherited |
Definition at line 69 of file enable_shared_from_this.h.
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:42. Comments on this page |