tem_sphere_module Module

This module contains sphere definition and routines related to spheres



Interfaces

public interface init

initialize the dynamic array

  • private subroutine init_ga_sphere(me, length)

    Arguments

    Type IntentOptional Attributes Name
    type(grw_spherearray_type), intent(out) :: me
    integer, intent(in), optional :: length

public interface truncate

truncate the array, meaning cut off the trailing empty entries

public interface empty

empty the entries without changing arrays

public interface destroy

destroy the dynamic array

public interface placeat

insert an element at a given position

  • private subroutine placeat_ga_sphere(me, val, pos, length)

    adds the value to a given position inside the growing array.

    if the requested position is outside the current array bounds, the array will be resized accordingly. if it is inside the current array bounds, the element at the requested position will be replaced.

    Arguments

    Type IntentOptional Attributes Name
    type(grw_spherearray_type) :: me
    type(tem_sphere_type), intent(in) :: val
    integer, intent(in) :: pos
    integer, intent(in), optional :: length

    optional length to expand the array

  • private subroutine placeat_ga_sphere_vec(me, val, pos, length)

    adds the values starting from a given position inside the growing array.

    if the requested position is outside the current array bounds, the array will be resized accordingly. if it is inside the current array bounds, the elements starting from the requested position will be replaced up to the element at position pos + size(val) - 1.

    Arguments

    Type IntentOptional Attributes Name
    type(grw_spherearray_type) :: me
    type(tem_sphere_type), intent(in) :: val(:)
    integer, intent(in) :: pos
    integer, intent(in), optional :: length

    optional length to expand the array

public interface append

append a value to the dynamic array and return its position.

public interface tem_sphere_out

interface to write out spheres in lua format to a file

  • private subroutine tem_sphere_out_scal(me, conf)

    Write out a sphere shape in lua format

    Arguments

    Type IntentOptional Attributes Name
    type(tem_sphere_type), intent(in) :: me

    sphere types to write out

    type(aot_out_type), intent(inout) :: conf

    Aotus type handling the output to the file in lua format

  • private subroutine tem_sphere_out_vec(me, conf)

    Write out an array of spheres in lua format

    Arguments

    Type IntentOptional Attributes Name
    type(tem_sphere_type), intent(in) :: me(:)

    sphere types to write out

    type(aot_out_type), intent(inout) :: conf

    Aotus type handling the output to the file in lua format

private interface expand

increase the size of the container for the array.

  • private subroutine expand_ga_sphere(me, pos, length)

    Arguments

    Type IntentOptional Attributes Name
    type(grw_spherearray_type) :: me
    integer, intent(in), optional :: pos
    integer, intent(in), optional :: length

    optional length to expand the array

private interface tem_load_sphere

interface to load spheres

  • private interface tem_load_sphere()

    interface to load spheres

    Arguments

    None
  • private subroutine tem_load_sphere_single(me, transform, conf, thandle)

    This routine single sphere from object table

    Arguments

    Type IntentOptional Attributes Name
    type(tem_sphere_type), intent(out) :: me

    single sphere

    type(tem_transformation_type), intent(in) :: transform

    transformation for spatial object

    type(flu_State) :: conf

    lua state

    integer, intent(in) :: thandle

Derived Types

type, public ::  tem_sphere_type

type contains sphere information

Components

Type Visibility Attributes Name Initial
real(kind=rk), public :: origin(3)
real(kind=rk), public :: radius
logical, public :: only_surface

To choose what to do with intersection of this object if only_surface = true than the only the surface of the object is intersected if only_surface = false then the whole object is intersected default is set to false

type, public ::  grw_spherearray_type

growing array type for type(tem_sphere_type)

Components

Type Visibility Attributes Name Initial
integer, public :: nvals = 0
integer, public :: containersize = 0
type(tem_sphere_type), public, allocatable :: val(:)

Functions

public function tem_sphereCubeOverlap(sphere, cube) result(overlap)

This function checks intesection of solid cube and sphere

Arguments

Type IntentOptional Attributes Name
type(tem_sphere_type), intent(in) :: sphere
type(tem_cube_type), intent(in) :: cube

Return Value logical

private function hollowSphereCubeOverlap(sphere, cube) result(overlap)

This function checks intesection of solid cube and hollow sphere

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_sphere_type), intent(in) :: sphere
type(tem_cube_type), intent(in) :: cube

Return Value logical

private function solidSphereCubeOverlap(sphere, cube) result(overlap)

This function checks intesection of solid cube and solid sphere

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_sphere_type), intent(in) :: sphere
type(tem_cube_type), intent(in) :: cube

Return Value logical


Subroutines

public subroutine tem_load_sphere(me, transform, conf, thandle)

Load sphere information from config file.

Arguments

Type IntentOptional Attributes Name
type(tem_sphere_type), intent(out), allocatable :: me(:)

Array of spheres

type(tem_transformation_type), intent(in) :: transform

transformation for spatial object

type(flu_State) :: conf

lua state

integer, intent(in) :: thandle

private subroutine tem_load_sphere_single(me, transform, conf, thandle)

This routine single sphere from object table

Arguments

Type IntentOptional Attributes Name
type(tem_sphere_type), intent(out) :: me

single sphere

type(tem_transformation_type), intent(in) :: transform

transformation for spatial object

type(flu_State) :: conf

lua state

integer, intent(in) :: thandle

private subroutine tem_sphere_out_vec(me, conf)

Write out an array of spheres in lua format

Arguments

Type IntentOptional Attributes Name
type(tem_sphere_type), intent(in) :: me(:)

sphere types to write out

type(aot_out_type), intent(inout) :: conf

Aotus type handling the output to the file in lua format

private subroutine tem_sphere_out_scal(me, conf)

Write out a sphere shape in lua format

Arguments

Type IntentOptional Attributes Name
type(tem_sphere_type), intent(in) :: me

sphere types to write out

type(aot_out_type), intent(inout) :: conf

Aotus type handling the output to the file in lua format

private subroutine init_ga_sphere(me, length)

Arguments

Type IntentOptional Attributes Name
type(grw_spherearray_type), intent(out) :: me
integer, intent(in), optional :: length

private subroutine destroy_ga_sphere(me)

Arguments

Type IntentOptional Attributes Name
type(grw_spherearray_type), intent(inout) :: me

private subroutine truncate_ga_sphere(me)

Arguments

Type IntentOptional Attributes Name
type(grw_spherearray_type) :: me

private subroutine empty_ga_sphere(me)

Arguments

Type IntentOptional Attributes Name
type(grw_spherearray_type) :: me

private subroutine placeat_ga_sphere(me, val, pos, length)

adds the value to a given position inside the growing array.

Read more…

Arguments

Type IntentOptional Attributes Name
type(grw_spherearray_type) :: me
type(tem_sphere_type), intent(in) :: val
integer, intent(in) :: pos
integer, intent(in), optional :: length

optional length to expand the array

private subroutine placeat_ga_sphere_vec(me, val, pos, length)

adds the values starting from a given position inside the growing array.

Read more…

Arguments

Type IntentOptional Attributes Name
type(grw_spherearray_type) :: me
type(tem_sphere_type), intent(in) :: val(:)
integer, intent(in) :: pos
integer, intent(in), optional :: length

optional length to expand the array

private subroutine append_ga_sphere(me, val, length)

Arguments

Type IntentOptional Attributes Name
type(grw_spherearray_type) :: me
type(tem_sphere_type), intent(in) :: val
integer, intent(in), optional :: length

optional length to expand the array

private subroutine append_ga_sphere_vec(me, val, length)

Arguments

Type IntentOptional Attributes Name
type(grw_spherearray_type) :: me
type(tem_sphere_type), intent(in) :: val(:)
integer, intent(in), optional :: length

optional length to expand the array

private subroutine expand_ga_sphere(me, pos, length)

Arguments

Type IntentOptional Attributes Name
type(grw_spherearray_type) :: me
integer, intent(in), optional :: pos
integer, intent(in), optional :: length

optional length to expand the array