A description of the data in the vector. More...
#include <Variable.h>

Public Member Functions | |
| virtual std::string | className () const |
| 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. | |
| virtual std::shared_ptr< VectorSelector > | createVectorSelector () const |
| Create a VectorSelector. | |
| virtual uint64_t | getID () const |
| Get a unique id hash for the vector. | |
| auto & | getName () const |
| A function that returns the name of a variable. | |
| 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 |
| Variable ()=default | |
| Variable (const std::string &name) | |
| Construct a variable with a name. | |
| Variable (int64_t fid) | |
| Read restart data to file. | |
| virtual void | writeRestart (int64_t fid) const |
| Write restart data to file. | |
| virtual | ~Variable () |
| Destructor. | |
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_ |
A description of the data in the vector.
This class stores information about the vector such as the name and units. It is used in subsetting operations.
Definition at line 45 of file Variable.h.
|
default |
|
explicit |
Construct a variable with a name.
At the very least, a variable must have a name. Since this class is virtual, this constructor is used by derived classes.
| name | The name of the variable |
|
virtual |
Destructor.
| AMP::LinearAlgebra::Variable::Variable | ( | int64_t | fid | ) |
Read restart data to file.
This function will create a variable from the restart file
| fid | File identifier to write |
|
inlinevirtual |
A function that returns the name of a variable.
This gives access to the name
Reimplemented in AMP::LinearAlgebra::CommSelfVariable, AMP::LinearAlgebra::CommVariable, AMP::LinearAlgebra::MeshVariable, AMP::LinearAlgebra::MeshIteratorVariable, AMP::LinearAlgebra::MultiVariable, AMP::LinearAlgebra::RandomSubsetVariable, AMP::LinearAlgebra::StridedVariable, and AMP::LinearAlgebra::SubsetVariable.
Definition at line 80 of file Variable.h.
| std::shared_ptr< Variable > AMP::LinearAlgebra::Variable::clone | ( | ) | const |
Create a variable of the same type with a new name.
This function will create a "deep" copy of this variable.
|
virtual |
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.
|
virtual |
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 in AMP::LinearAlgebra::CommSelfVariable, AMP::LinearAlgebra::CommVariable, AMP::LinearAlgebra::MeshVariable, AMP::LinearAlgebra::MeshIteratorVariable, AMP::LinearAlgebra::MultiVariable, AMP::LinearAlgebra::StridedVariable, and AMP::LinearAlgebra::SubsetVariable.
|
virtual |
Get a unique id hash for the vector.
Reimplemented in AMP::LinearAlgebra::CommSelfVariable, AMP::LinearAlgebra::CommVariable, AMP::LinearAlgebra::MeshVariable, and AMP::LinearAlgebra::MeshIteratorVariable.
|
inline |
A function that returns the name of a variable.
This gives access to the name
Definition at line 74 of file Variable.h.
References d_VariableName.
|
virtual |
Get the units of this variable.
| bool AMP::LinearAlgebra::Variable::operator!= | ( | const Variable & | rhs | ) | const |
Inverse of ==.
This function performs an equality check and negates it.
| rhs | Variable to compare |
|
virtual |
Compares two variables for equality.
This operation compares the names.
| rhs | Variable to compare |
Reimplemented in AMP::LinearAlgebra::MultiVariable.
|
virtual |
Register any child objects.
This function will register child objects with the manager
| manager | Restart manager |
Reimplemented in AMP::LinearAlgebra::MultiVariable.
|
virtual |
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 |
Write restart data to file.
This function will the variable to an HDF5 file
| fid | File identifier to write |
Reimplemented in AMP::LinearAlgebra::CommSelfVariable, AMP::LinearAlgebra::CommVariable, AMP::LinearAlgebra::MeshVariable, AMP::LinearAlgebra::MeshIteratorVariable, AMP::LinearAlgebra::MultiVariable, AMP::LinearAlgebra::RandomSubsetVariable, AMP::LinearAlgebra::StridedVariable, and AMP::LinearAlgebra::SubsetVariable.
|
protected |
The units this variable is measured in.
Definition at line 155 of file Variable.h.
|
protected |
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 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:43. Comments on this page |