sphere_1D_interface.F90 Source File


This file depends on

sourcefile~~sphere_1d_interface.f90~~EfferentGraph sourcefile~sphere_1d_interface.f90 sphere_1D_interface.F90 sourcefile~block_metadata_interface.f90 block_metadata_interface.F90 sourcefile~sphere_1d_interface.f90->sourcefile~block_metadata_interface.f90 sourcefile~kind_parameters.f90 kind_parameters.f90 sourcefile~sphere_1d_interface.f90->sourcefile~kind_parameters.f90 sourcefile~geometry_interface.f90 geometry_interface.f90 sourcefile~sphere_1d_interface.f90->sourcefile~geometry_interface.f90 sourcefile~block_metadata_interface.f90->sourcefile~kind_parameters.f90

Files dependent on this one

sourcefile~~sphere_1d_interface.f90~~AfferentGraph sourcefile~sphere_1d_interface.f90 sphere_1D_interface.F90 sourcefile~problem_discretization_interface.f90 problem_discretization_interface.F90 sourcefile~problem_discretization_interface.f90->sourcefile~sphere_1d_interface.f90 sourcefile~sphere_1d_implementation.f90 sphere_1D_implementation.F90 sourcefile~sphere_1d_implementation.f90->sourcefile~sphere_1d_interface.f90 sourcefile~problem_discretization_implementation.f90 problem_discretization_implementation.F90 sourcefile~problem_discretization_implementation.f90->sourcefile~problem_discretization_interface.f90

Contents


Source Code

!
!     (c) 2019-2020 Guide Star Engineering, LLC
!     This Software was developed for the US Nuclear Regulatory Commission (US NRC) under contract
!     "Multi-Dimensional Physics Implementation into Fuel Analysis under Steady-state and Transients (FAST)",
!     contract # NRC-HQ-60-17-C-0007
!
module sphere_1D_interface
  !! author: Damian Rouson and Karla Morris
  !! date: 2/24/2020
  !!
  !! Encapsulate a 3D plate geometry and grid-verification method
  use geometry_interface, only : geometry
  use json_module, only : json_file
  use block_metadata_interface, only : block_metadata, subdomain_t, max_name_length, space_dimension, num_end_points
  use kind_parameters, only : r8k

  implicit none

  private
  public :: sphere_1D

  type, extends(geometry) :: sphere_1D
    !! encapsulate the grid specification for a sphere_1D object
    private
    type(json_file) :: grid_specification
    type(block_metadata), dimension(:,:,:), allocatable :: metadata
    real(r8k) :: end_time
    character(len=:), allocatable :: units_system
  contains
    procedure :: set_grid_specification
    procedure :: set_block_metadata
    procedure :: get_block_metadata_shape
    procedure :: get_block_domain
    procedure :: get_block_metadatum
    procedure :: get_block_metadata
    procedure :: get_end_time
  end type

  interface

    module subroutine set_grid_specification(this, grid_description_file)
      !! define json_file problem description
      implicit none
      class(sphere_1D), intent(out) :: this
      character(len=*), intent(in) :: grid_description_file
    end subroutine

    module subroutine set_block_metadata(this)
      !! read grid metadata from json_file stored in child class
      implicit none
      class(sphere_1D), intent(inout) :: this
    end subroutine

    module function get_end_time(this) result(end_time)
      !! define the shape of the array of grid blocks
      implicit none
      class(sphere_1D), intent(in) :: this
      real(r8k) :: end_time
    end function

    module function get_block_metadata_shape(this) result(shape_)
      !! define the shape of the array of grid blocks
      implicit none
      class(sphere_1D), intent(in) :: this
      integer, dimension(space_dimension) :: shape_
    end function

    module function get_block_domain(this, indicial_coordinates) result(this_domain)
      !! result is the spatial subdomain for the grid block with the given indicial_coordinates
      implicit none
      class(sphere_1D), intent(in) :: this
      integer, dimension(space_dimension) :: indicial_coordinates
      integer, parameter :: num_end_points=2
      real(r8k), dimension(space_dimension,num_end_points) :: this_domain
    end function

    module function get_block_metadatum(this, indicial_coordinates) result(this_metadata_xyz)
      !! result is the block_metadata component for the block with the given indicial_coordinates
      implicit none
      class(sphere_1D), intent(in) :: this
      integer, dimension(space_dimension) :: indicial_coordinates
      type(block_metadata) :: this_metadata_xyz
    end function

    module function get_block_metadata(this) result(this_metadata)
      !! result is the block_metadata component for all blocks
      implicit none
      class(sphere_1D), intent(in) :: this
      type(block_metadata), dimension(:,:,:), allocatable :: this_metadata
    end function

  end interface

end module sphere_1D_interface