D.5 Assembled_Vector Class Code Listing

The main documentation of the Assembled_Vector Class contains additional explanation of this code listing.

!
! Author: Michael L. Hall
!         P.O. Box 1663, MS-D413, LANL
!         Los Alamos, NM 87545
!         ph: 505-665-4312
!         email: Hall@LANL.gov
! 
! Created on: 10/04/99
! CVS Info:   $Id: assembled_vector.F90,v 4.4 2006/10/17 23:01:53 hall Exp $

module Caesar_Assembled_Vector_Class

  ! Global use associations.

  use Caesar_Intrinsics_Module
  use Caesar_Communication_Class
  use Caesar_Base_Structure_Class

  ! Start up with everything untyped and private.

  implicit none
  private

  ! Public procedures.

  public :: Initialize, Finalize, Valid_State, Initialized
  public :: Assignment (=), Get_Values, Locus, Name, Output, Set_Values, &
            Set_Version, Version

  interface Initialize
    module procedure Initialize_Assembled_Vector
  end interface

  interface Finalize
    module procedure Finalize_Assembled_Vector
  end interface

  interface Valid_State
    module procedure Valid_State_Assembled_Vector
  end interface

  interface Initialized
    module procedure Initialized_Assembled_Vector
  end interface

  interface Assignment (=)
    module procedure Get_Values_Assembled_Vector_1
    module procedure Get_Values_Assembled_Vector_2
    module procedure Get_Values_Assembled_Vector_3
    module procedure Get_Values_Assembled_Vector_4
    module procedure Set_Values_Assembled_Vector_1
    module procedure Set_Values_Assembled_Vector_2
    module procedure Set_Values_Assembled_Vector_3
    module procedure Set_Values_Assembled_Vector_4
    module procedure Set_Version_Assembled_Vector
  end interface

  interface Get_Values
    module procedure Get_Values_Assembled_Vector_1
    module procedure Get_Values_Assembled_Vector_2
    module procedure Get_Values_Assembled_Vector_3
    module procedure Get_Values_Assembled_Vector_4
  end interface

  interface Locus
    module procedure Get_Locus_Assembled_Vector
  end interface

  interface Name
    module procedure Get_Name_Assembled_Vector
  end interface

  interface Output
    module procedure Output_Assembled_Vector
  end interface

  interface Set_Version
    module procedure Set_Version_Assembled_Vector
  end interface

  interface Set_Values
    module procedure Set_Values_Assembled_Vector_1
    module procedure Set_Values_Assembled_Vector_2
    module procedure Set_Values_Assembled_Vector_3
    module procedure Set_Values_Assembled_Vector_4
  end interface

  interface Version
    module procedure Get_Version_Assembled_Vector
  end interface

  ! Public type definitions.

  public :: Assembled_Vector_type

  type Assembled_Vector_type

    ! Initialization flag.

    type(integer) :: Initialized

    ! The name for this variable (especially useful in a vector of Assembled
    ! Vectors).

    type(character,name_length) :: Name

    ! 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.

    type(integer) :: Version  

    ! Basic data structure for the axis that is spread over the processors.

    type(Base_Structure_type), pointer :: Structure

    ! The number of dimensions that the "vector" has, including the dimension
    ! that is spread over the processors. "Ragged_Right" vectors are signified
    ! by a Dimensionality of -1.

    type(integer) :: Dimensionality

    ! The extents of the dimensions that the "vector" has, including
    ! the dimension that is spread over the processors, which is last. 

    type(integer,1) :: Dimensions

    ! Total number of values in this vector.

    type(integer) :: NValues_Total

    ! Values in the vector, only defined on IO_PE. Values may have either 1,
    ! 2, 3, or 4 dimensions, or be a ragged right array. The last dimension
    ! is always the dimension to be spread across the processors. Only one
    ! of the following variables will be allocated for a given object.

    type(real,1) :: Values1
    type(real,2) :: Values2
    type(real,3) :: Values3
    type(real,4) :: Values4
    ! Needed for Adaptive Angular Refinement.
    ! type(Ragged_Right_Real_type) :: ValuesRR 

  end type Assembled_Vector_type

  ! Global class variables.

  type(integer), parameter :: Version_Increment = 1

contains

The Assembled_Vector Class contains the following routines which are listed in separate sections:

* Initialize_Assembled_Vector
* Finalize_Assembled_Vector
* Valid_State_Assembled_Vector
* Initialized_Assembled_Vector
* Get_Locus_Assembled_Vector
* Get_Name_Assembled_Vector
* Get_Values_Assembled_Vector
* Get_Version_Assembled_Vector
* Output_Assembled_Vector
* Set_Values_Assembled_Vector
* Set_Version_Assembled_Vector

end module Caesar_Assembled_Vector_Class



Subsections
Michael L. Hall