10.6 Distributed_Vector Class

The Distributed_Vector Class is used to describe a distributed vector (existing across all the processors) in the CÆSAR Code Package. A Distributed_Vector is part of the overall data structure strategy in CÆSAR, which is made up of the following classes: Base_Structure, Data_Index, Assembled_Vector, Distributed_Vector, Overlapped_Vector, and Collected_Array. A description of the overall data structure strategy can be found in the Data_Structures Module.

The form of a Distributed_Vector object is given by:

  Vector ( [dim1, [dim2, [dim3,]]] Structure_Axis )
or
  Vector ( dim_ragged_right, Structure_Axis )
  --> not implemented
where Structure_Axis refers to the axis which is spread across the processors.

Distributed_Vector public procedures:

 Fundamental procedures  
 Initialize  Initializes a Distributed_Vector object.
 Finalize  Finalizes a Distributed_Vector object.
 Valid_State  Returns false iff a Distributed_Vector object is in an invalid state.
 Initialized  Returns true iff a Distributed_Vector object has been initialized.
 Operations  
 Assemble  Sets an Assembled_Vector object to a Distributed_Vector object by assembling the data on the IO PE (also has an assignment interface).
 Distribute  Sets a Distributed_Vector object to an Assembled_Vector object by distributing the data from the IO PE to all the PEs (also has an assignment interface).
 Get_Values  Gets the values from a Distributed_Vector object and returns them in a bare naked vector (also has an assignment interface).
 Locus  Returns the locus of the Distributed_Vector object.
 Name  Returns the name of the Distributed_Vector object.
 Output  Writes out the Distributed_Vector object.
 Set_Values  Sets the values of the Distributed_Vector object to a bare naked vector (also has an assignment interface).
 Set_Version  Sets the version number of the Distributed_Vector object (also has an assignment interface).
 Version  Returns the version number of the Distributed_Vector object.

Distributed_Vector public defined type:

 Distributed_Vector type  
 Dimensionality  The number of dimensions that the index``vector'' has, including the dimension that is spread over the processors. ``Ragged_Right'' indices are signified by a Dimensionality of -1. (Ragged_Right is not yet implemented.)
 Dimensions  The extents of the dimensions that the ``vector'' has, including the dimension that is spread over the processors, which is last.
 Initialized  Initialization status.
 Name  The name for this variable (especially useful in a vector of Distributed Vectors).
 NValues_PE  Number of values on this PE.
 NValues_Total  Total number of values in the entire vector (including all PEs).
 NValues_Vector  A vector containing the number of values on each PE.
 Structure  Basic data structure for the axis that is spread over the processors.
 Values{n}  Values in the vector, with a different length on each PE. Values may have either 1, 2, 3, or 4 dimensions (n = 1, 2, 3, or 4), or be a ragged right array (n = RR). The last dimension is always the dimension to be spread across the processors. Only one of the variables will be allocated for a given object. Ragged right arrays have not been implemented yet.
 Version  Version number which is incremented every time the vector is modified, or is synced with the version number of a data structure that it depends on when it is updated.

The Distributed_Vector Class code listing contains additional documentation. The Distributed_Vector Class also contains a Unit Test Program.



Subsections
Michael L. Hall