SELF_DataObj Derived Type

type, public :: SELF_DataObj

The SELF_DataObj class is a base class for all data objects in SELF. A data object in SELF is a multidimensional array of data, represented on both host and device, that is associated with an interpolant, metadata, and (optionally) an equation string. Type extensions of the SELF_DataObj include scalars, vectors, and tensors in 1-D, 2-D, and 3-D using the storage patterns that are expected for derivative and interpolation operations defined in SELF_Lagrange.f90 Additionally, each extended type has the necessary attributes to store information on element interiors and element boundaries, both of which are commonly used for spectral element solvers.


Contents

Source Code


Components

TypeVisibilityAttributesNameInitial
integer, public :: M
integer, public :: N
type(EquationParser), public, allocatable:: eqn(:)
type(Lagrange), public, pointer:: interp
type(Metadata), public, allocatable:: meta(:)
integer, public :: nElem
integer, public :: nVar

Type-Bound Procedures

procedure, public :: SetDescription => SetDescription_DataObj

  • public subroutine SetDescription_DataObj(this, ivar, description)

    Set the description of the ivar-th variable

    Arguments

    TypeIntentOptionalAttributesName
    class(SELF_DataObj), intent(inout) :: this
    integer, intent(in) :: ivar
    character, intent(in) :: description

generic, public :: SetEquation => SetEquation_DataObj

  • public subroutine SetEquation_DataObj(this, ivar, eqnChar)

    Sets the equation parser for the ivar-th variable

    Arguments

    TypeIntentOptionalAttributesName
    class(SELF_DataObj), intent(inout) :: this
    integer, intent(in) :: ivar
    character, intent(in) :: eqnChar

procedure, private :: SetEquation_DataObj

  • public subroutine SetEquation_DataObj(this, ivar, eqnChar)

    Sets the equation parser for the ivar-th variable

    Arguments

    TypeIntentOptionalAttributesName
    class(SELF_DataObj), intent(inout) :: this
    integer, intent(in) :: ivar
    character, intent(in) :: eqnChar

procedure, public :: SetName => SetName_DataObj

  • public subroutine SetName_DataObj(this, ivar, name)

    Set the name of the ivar-th variable

    Arguments

    TypeIntentOptionalAttributesName
    class(SELF_DataObj), intent(inout) :: this
    integer, intent(in) :: ivar
    character, intent(in) :: name

procedure, public :: SetUnits => SetUnits_DataObj

  • public subroutine SetUnits_DataObj(this, ivar, units)

    Set the units of the ivar-th variable

    Arguments

    TypeIntentOptionalAttributesName
    class(SELF_DataObj), intent(inout) :: this
    integer, intent(in) :: ivar
    character, intent(in) :: units

Source Code

  type,public :: SELF_DataObj
  !! The SELF_DataObj class is a base class for all data objects in SELF.
  !! A data object in SELF is a multidimensional array of data, represented
  !! on both host and device, that is associated with an interpolant, metadata,
  !! and (optionally) an equation string.
  !! Type extensions of the SELF_DataObj include scalars, vectors, and tensors
  !! in 1-D, 2-D, and 3-D using the storage patterns that are expected for
  !! derivative and interpolation operations defined in SELF_Lagrange.f90
  !! Additionally, each extended type has the necessary attributes to store
  !! information on element interiors and element boundaries, both of which
  !! are commonly used for spectral element solvers.

    integer :: nVar
    integer :: nElem
    integer :: N
    integer :: M
    type(Lagrange),pointer :: interp
    type(Metadata),allocatable :: meta(:)
    type(EquationParser),allocatable :: eqn(:)

  contains

    ! Procedures for setting metadata for
    procedure,public :: SetName => SetName_DataObj
    procedure,public :: SetDescription => SetDescription_DataObj
    procedure,public :: SetUnits => SetUnits_DataObj
    generic,public :: SetEquation => SetEquation_DataObj
    procedure,private :: SetEquation_DataObj

  endtype SELF_DataObj