sysc::Variable Class Reference
Last update: 17.07.2025Provide a class for a System Coupling variable. More...
#include <Variable.hpp>
Public Member Functions | |
| Variable (const VariableName &name) | |
| Provide a constructor for the Variable class. More... | |
| Variable (const VariableName &name, enum TensorType tensorType, bool isExtensive, enum Location location) | |
| Provide a constructor for the Variable class. More... | |
| Variable (const VariableName &name, enum TensorType tensorType, bool isExtensive, enum Location location, enum DataType dataType) | |
| Provide a constructor for the Variable class. More... | |
| Variable (const VariableName &name, const DisplayName &displayName, enum TensorType tensorType, bool isExtensive, enum Location location, enum QuantityType quantityType) | |
| Provide a constructor for the Variable class. More... | |
| Variable (const VariableName &name, const DisplayName &displayName, enum TensorType tensorType, bool isExtensive, enum Location location, enum QuantityType quantityType, enum DataType dataType) | |
| Provide a constructor for the Variable class. More... | |
| Variable (const VariableName &name, enum QuantityType quantityType, enum Location location=Node, const DisplayName &displayName=DisplayName()) | |
| Provide a constructor for the Variable class. More... | |
| const VariableName & | getName () const noexcept |
| Get the variable's name. More... | |
| enum TensorType | getTensorType () const noexcept |
| Get the variable's tensor type. More... | |
| bool | getIsExtensive () const noexcept |
| The the is extensive boolean for this variable. More... | |
| enum QuantityType | getQuantityType () const noexcept |
| Get the variable's quantity type. More... | |
| enum Location | getLocation () const noexcept |
| Get the variable's location. More... | |
| const DisplayName & | getDisplayName () const noexcept |
| Get the variable's display name. More... | |
| enum DataType | getDataType () const noexcept |
| Get the variable's data type. More... | |
| void | addRealAttribute (const RealAttribute &attribute) |
| Add a real-valued attribute. | |
| void | addIntegerAttribute (const IntegerAttribute &attribute) |
| Add an integer-valued attribute. | |
| std::size_t | getNumRealAttributes () const noexcept |
| Returns the number of real-valued attributes. | |
| std::size_t | getNumIntegerAttributes () const noexcept |
| Returns the number of integer-valued attributes. | |
| const RealAttribute & | getRealAttribute (std::size_t index) const |
| Return the real-valued attribute at the given index. | |
| const IntegerAttribute & | getIntegerAttribute (std::size_t index) const |
| Return the integer-valued attribute at the given index. | |
Detailed Description
Provide a class for a System Coupling variable.
Definition at line 21 of file Variable.hpp.
Constructor & Destructor Documentation
◆ Variable() [1/6]
|
explicit |
Provide a constructor for the Variable class.
- Parameters
-
name Unique name for this variable.
Display name will default to the same as name.
Tensor type will default to scalar.
Is extensive flag will default to false (to non-extensive).
Location will default to nodes.
Quantity type will default to unspecified.
DataType will default to real.
◆ Variable() [2/6]
| sysc::Variable::Variable | ( | const VariableName & | name, |
| enum TensorType | tensorType, | ||
| bool | isExtensive, | ||
| enum Location | location | ||
| ) |
Provide a constructor for the Variable class.
- Parameters
-
name - Unique name for this variable. String length should not exceed SYSC_STRING_LENGTH. tensorType - variable tensor type. isExtensive - flag indicating if it's an extensive property. location - variable location (e.g element or node).
Display name will default to the same as name.
Quantity type will default to unspecified.
DataType will default to real.
◆ Variable() [3/6]
| sysc::Variable::Variable | ( | const VariableName & | name, |
| enum TensorType | tensorType, | ||
| bool | isExtensive, | ||
| enum Location | location, | ||
| enum DataType | dataType | ||
| ) |
Provide a constructor for the Variable class.
- Parameters
-
name - Unique name for this variable. String length should not exceed SYSC_STRING_LENGTH. tensorType - variable tensor type. isExtensive - flag indicating if it's an extensive property. location - variable location (e.g element or node). dataType - dataType
Display name will default to the same as name.
Quantity type will default to unspecified.
◆ Variable() [4/6]
| sysc::Variable::Variable | ( | const VariableName & | name, |
| const DisplayName & | displayName, | ||
| enum TensorType | tensorType, | ||
| bool | isExtensive, | ||
| enum Location | location, | ||
| enum QuantityType | quantityType | ||
| ) |
Provide a constructor for the Variable class.
- Parameters
-
name - Unique name for this variable. displayName - variable display name. tensorType - variable tensor type. isExtensive - flag indicating if it's an extensive property. location - variable location (e.g element or node). quantityType - Quantity type of this variable.
DataType will default to real.
◆ Variable() [5/6]
| sysc::Variable::Variable | ( | const VariableName & | name, |
| const DisplayName & | displayName, | ||
| enum TensorType | tensorType, | ||
| bool | isExtensive, | ||
| enum Location | location, | ||
| enum QuantityType | quantityType, | ||
| enum DataType | dataType | ||
| ) |
Provide a constructor for the Variable class.
- Parameters
-
name - Unique name for this variable. displayName - variable display name. tensorType - variable tensor type. isExtensive - flag indicating if it's an extensive property. location - variable location (e.g element or node). quantityType - Quantity type of this variable. dataType - Data type of this variable.
◆ Variable() [6/6]
| sysc::Variable::Variable | ( | const VariableName & | name, |
| enum QuantityType | quantityType, | ||
| enum Location | location = Node, |
||
| const DisplayName & | displayName = DisplayName() |
||
| ) |
Provide a constructor for the Variable class.
- Parameters
-
name - Unique name for this variable. quantityType - Quantity type of this variable. Supported quantity types are defined above in this header file. location - variable location (e.g element or node). This parameter is optional - the default value is node. displayName - variable display name. This parameter is optional - it will default to the same value as the variable's name.
Note that provided quantity type will determine the value of the tensor type and is extensive parameters. The values will be inferred according to the following rules:
For a more explicit control of tensor type and is extensive values, consider using another constructor.
DataType will default to real.
Member Function Documentation
◆ getDataType()
|
noexcept |
Get the variable's data type.
- Returns
- Return is the DataType enum.
◆ getDisplayName()
|
noexcept |
Get the variable's display name.
- Returns
- Return is the display name of this variable (string).
◆ getIsExtensive()
|
noexcept |
The the is extensive boolean for this variable.
- Returns
- Return is the boolean, true if variable is extensive, false otherwise.
◆ getLocation()
|
noexcept |
Get the variable's location.
- Returns
- Return is Location of this variable.
◆ getName()
|
noexcept |
Get the variable's name.
- Returns
- Return is the name of this variable (string).
◆ getQuantityType()
|
noexcept |
Get the variable's quantity type.
- Returns
- Return is the QuantityType struct of this variable.
◆ getTensorType()
|
noexcept |
Get the variable's tensor type.
- Returns
- Return is the TensorType enum.