Skip to main content
Definition: Variable.hpp (line 21) Provide a class for a System Coupling variable.

Members

Private attributes

Variable m_name

Definition: Variable.hpp (line 236)
Unique name for this variable. Type: VariableName

Variable m_quantityType

Definition: Variable.hpp (line 237)
Quantity type (e.g. temperature) Type: QuantityType

Variable m_location

Definition: Variable.hpp (line 238)
Location (e.g element or node). Type: Location

Variable m_displayName

Definition: Variable.hpp (line 239)
User-friendly name. Type: DisplayName

Variable m_tensorType

Definition: Variable.hpp (line 240)
Tensor type (e.g. scalar, vector). Type: TensorType

Variable m_isExtensive

Definition: Variable.hpp (line 241)
Extensive property flag. Type: bool

Variable m_dataType

Definition: Variable.hpp (line 242)
Data type (e.g. real, complex). Type: DataType

Variable m_realAttributes

Definition: Variable.hpp (line 244)
Type: std::vector< RealAttribute >

Variable m_integerAttributes

Definition: Variable.hpp (line 245)
Type: std::vector< IntegerAttribute >

Variable m_stringAttributes

Definition: Variable.hpp (line 246)
Type: std::vector< StringAttribute >

Public functions

Function Variable

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. Parameters: Return type:

Function Variable

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. Parameters: Return type:

Function Variable

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. Parameters: Return type:

Function Variable

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. Parameters: Return type:

Function Variable

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.
Parameters: Return type:

Function Variable

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. Parameters: Return type:

Function getName

Get the variable’s name. Returns: Return is the name of this variable (string). Return type: const VariableName &

Function getTensorType

Get the variable’s tensor type. Returns: Return is the TensorType enum. Return type: enum TensorType

Function getIsExtensive

The the is extensive boolean for this variable. Returns: Return is the boolean, true if variable is extensive, false otherwise. Return type: bool

Function getQuantityType

Get the variable’s quantity type. Returns: Return is the QuantityType struct of this variable. Return type: enum QuantityType

Function getLocation

Get the variable’s location. Returns: Return is Location of this variable. Return type: enum Location

Function getDisplayName

Get the variable’s display name. Returns: Return is the display name of this variable (string). Return type: const DisplayName &

Function getDataType

Get the variable’s data type. Returns: Return is the DataType enum. Return type: enum DataType

Function addRealAttribute

Add a real-valued attribute. Parameters: Return type: void

Function addIntegerAttribute

Add an integer-valued attribute. Parameters: Return type: void

Function addStringAttribute

Add a string-valued attribute. Parameters: Return type: void

Function getNumRealAttributes

Returns the number of real-valued attributes. Return type: std::size_t

Function getNumIntegerAttributes

Returns the number of integer-valued attributes. Return type: std::size_t

Function getNumStringAttributes

Returns the number of string-valued attributes. Return type: std::size_t

Function getRealAttribute

Return the real-valued attribute at the given index. Parameters:
  • std::size_t index
Return type: const RealAttribute &

Function getIntegerAttribute

Return the integer-valued attribute at the given index. Parameters:
  • std::size_t index
Return type: const IntegerAttribute &

Function getStringAttribute

Return the string-valued attribute at the given index. Parameters:
  • std::size_t index
Return type: const StringAttribute &