t_base Derived Type

type, public :: t_base


Inherits

type~~t_base~~InheritsGraph type~t_base t_base type~t_fbase t_fBase type~t_base->type~t_fbase f type~t_sbase t_sBase type~t_base->type~t_sbase s type~c_sbase c_sbase type~t_sbase->type~c_sbase type~t_sgrid t_sGrid type~t_sbase->type~t_sgrid grid type~sll_c_spline_matrix sll_c_spline_matrix type~c_sbase->type~sll_c_spline_matrix mass type~c_sgrid c_sgrid type~t_sgrid->type~c_sgrid

Inherited by

type~~t_base~~InheritedByGraph type~t_base t_base type~t_transform_sfl t_transform_sfl type~t_transform_sfl->type~t_base X1sfl_base, X2sfl_base, GZ_base, GZsfl_base

Components

Type Visibility Attributes Name Initial
logical, public :: initialized = .FALSE.

set to true in init, set to false in free

class(t_sBase), public, ALLOCATABLE :: s

container for radial basis

type(t_fBase), public :: f

container for angular basis


Type-Bound Procedures

procedure, public :: free => base_free

  • private subroutine base_free(sf)

    finalize the type base

    Arguments

    Type IntentOptional Attributes Name
    class(t_base), intent(inout) :: sf

    self

procedure, public :: copy => base_copy

  • private subroutine base_copy(sf, tocopy)

    copy from input type base to self

    Arguments

    Type IntentOptional Attributes Name
    class(t_base), intent(inout) :: sf

    self

    class(t_base), intent(in) :: tocopy

procedure, public :: compare => base_compare

  • private subroutine base_compare(sf, tocompare, is_same)

    compare self and input type base

    Arguments

    Type IntentOptional Attributes Name
    class(t_base), intent(in) :: sf

    self

    class(t_base), intent(in) :: tocompare
    logical, intent(out) :: is_same

procedure, public :: change_base => base_change_base

  • private subroutine base_change_base(sf, old_base, old_data, sf_data)

    change basis from old input base to new base,

    Arguments

    Type IntentOptional Attributes Name
    class(t_base), intent(in) :: sf

    self

    class(t_base), intent(in) :: old_base
    real(kind=wp), intent(in) :: old_data(:,:)
    real(kind=wp), intent(out) :: sf_data(:,:)

procedure, public :: evalDOF => base_evalDOF

  • private subroutine base_evalDOF(sf, deriv, DOFs, y_IP_GP)

    evaluate all degrees of freedom at all Gauss Points (deriv=0 solution, deriv=1 first derivative d/ds)

    Arguments

    Type IntentOptional Attributes Name
    class(t_base), intent(in) :: sf

    self

    integer, intent(in) :: deriv(2)

    =(0,0): base, =(1,0): ds, =(0,2): dtheta, =(0,3): dzeta

    real(kind=wp), intent(in) :: DOFs(1:sf%s%nBase,1:sf%f%modes)

    array of all modes and all radial dofs

    real(kind=wp), intent(out) :: y_IP_GP(sf%f%mn_IP,sf%s%nGP_str:sf%s%nGP_end)

    OUTPUT ARRAY OF MPI SUBDOMAIN (GP points)

procedure, public :: evalDOF_all => base_evalDOF_all

  • private subroutine base_evalDOF_all(sf, DOFs, y_IP_GP, dy_dthet_IP_GP, dy_dzeta_IP_GP)

    evaluate all degrees of freedom at all Gauss Points , for deriv=0 in s and deriv=0,theta,zeta in f

    Arguments

    Type IntentOptional Attributes Name
    class(t_base), intent(in) :: sf

    self

    real(kind=wp), intent(in) :: DOFs(1:sf%s%nBase,1:sf%f%modes)

    array of all modes and all radial dofs

    real(kind=wp), intent(out), optional :: y_IP_GP(sf%f%mn_IP,sf%s%nGP_str:sf%s%nGP_end)

    value, OUTPUT ARRAY OF MPI SUBDOMAIN (GP points)

    real(kind=wp), intent(out), optional :: dy_dthet_IP_GP(sf%f%mn_IP,sf%s%nGP_str:sf%s%nGP_end)

    derivative in theta, OUTPUT ARRAY OF MPI SUBDOMAIN (GP points)

    real(kind=wp), intent(out), optional :: dy_dzeta_IP_GP(sf%f%mn_IP,sf%s%nGP_str:sf%s%nGP_end)

    derivative in zeta, OUTPUT ARRAY OF MPI SUBDOMAIN (GP points)

procedure, public :: evalDOF_x => base_evalDOF_x

  • private function base_evalDOF_x(sf, x, deriv, DOFs) result(y_IP)

    evaluate all degrees of freedom at given s theta zeta position (deriv=0 solution, deriv=1 first derivative d/ds)

    Arguments

    Type IntentOptional Attributes Name
    class(t_base), intent(in) :: sf

    self

    real(kind=wp), intent(in) :: x(3)

    s,theta,zeta

    integer, intent(in) :: deriv(2)

    =(0,0): base, =(1,0): ds, =(0,2): dtheta, =(0,3): dzeta

    real(kind=wp), intent(in) :: DOFs(1:sf%s%nBase,1:sf%f%modes)

    array of all modes and all radial dofs

    Return Value real(kind=wp)

Source Code

TYPE                 :: t_base
  !---------------------------------------------------------------------------------------------------------------------------------
  LOGICAL              :: initialized=.FALSE.      !! set to true in init, set to false in free
  !---------------------------------------------------------------------------------------------------------------------------------

  CLASS(t_sbase),ALLOCATABLE  :: s  !! container for radial basis
  TYPE(t_fbase)               :: f  !! container for angular basis

  CONTAINS

  PROCEDURE :: free        => base_free
  PROCEDURE :: copy        => base_copy
  PROCEDURE :: compare     => base_compare
  PROCEDURE :: change_base => base_change_base
  PROCEDURE :: evalDOF     => base_evalDOF
  PROCEDURE :: evalDOF_all  => base_evalDOF_all
  PROCEDURE :: evalDOF_x   => base_evalDOF_x

END TYPE t_base