marray_base_mod Module Reference

base class for mesh arrays More...

Data Types

interface  marray_base
 basic mesh array class More...
 
interface  selection_base
 type for selecting parts of an marray More...
 

Public Attributes

mesh indices

integer, save igmin
 
integer, save igmax
 1st dim More...
 
integer, save jgmin
 
integer, save jgmax
 2nd dim More...
 
integer, save kgmin
 
integer, save kgmax
 3rd dim More...
 
integer, save inum
 
integer, save jnum
 
integer, save knum
 array sizes More...
 
logical, save idx_init = .FALSE.
 init status More...
 

Methods

type(marray_base) function createmarray (m, n)
 constructor for mesh arrays More...
 
subroutine, public initmeshproperties (igmin_, igmax_, jgmin_, jgmax_, kgmin_, kgmax_)
 sets global mesh properties More...
 
subroutine, public closemeshproperties
 unsets global mesh properties More...
 
subroutine assignpointers (this)
 assign pointers of different shapes to the 1D data More...
 
real function, dimension(:,:,:), pointer remapbounds_0 (this, array)
 remap lower bounds in the first 3 dimensions of rank 0 mesh arrays More...
 
real function, dimension(:,:,:,:), pointer remapbounds_1 (this, array)
 remap lower bounds in the first 3 dimensions of rank 1 mesh arrays More...
 
real function, dimension(:,:,:,:,:), pointer remapbounds_2 (this, array)
 remap lower bounds in the first 3 dimensions of rank 2 mesh arrays More...
 
subroutine assignmarray_0 (this, ma)
 assigns one mesh array to another mesh array More...
 
pure subroutine assignmarray_1 (this, a)
 assign 1D fortran array to mesh array More...
 
pure subroutine assignmarray_2 (this, a)
 assign 2D fortran array to mesh array More...
 
pure subroutine assignmarray_3 (this, a)
 assign 3D fortran array to mesh array More...
 
pure subroutine assignmarray_4 (this, a)
 assign 4D fortran array to mesh array More...
 
pure subroutine assignmarray_5 (this, a)
 assign 5D fortran array to mesh array More...
 
pure real function, dimension(size(a%data1d)) addmarray_0 (a, b)
 add 2 mesh arrays More...
 
pure real function, dimension(size(a%data1d)) addmarray_1 (a, b)
 add 1D fortran array and mesh array More...
 
pure real function, dimension(size(a%data2d, 1), size(a%data2d, 2)) addmarray_2 (a, b)
 add 2D fortran array and mesh array More...
 
pure real function, dimension(size(a%data3d, 1), size(a%data3d, 2), size(a%data3d, 3)) addmarray_3 (a, b)
 add 3D fortran array and mesh array More...
 
pure real function, dimension(size(a%data4d, 1), size(a%data4d, 2), size(a%data4d, 3), size(a%data4d, 4)) addmarray_4 (a, b)
 add 4D fortran array and mesh array More...
 
pure real function, dimension(size(a%data5d, 1), size(a%data5d, 2), size(a%data5d, 3), size(a%data5d, 4), size(a%data5d, 5)) addmarray_5 (a, b)
 add 5D fortran array and mesh array More...
 
pure real function, dimension(size(a%data1d)) multmarray_0 (a, b)
 multiply 2 mesh arrays More...
 
pure real function, dimension(size(a%data1d)) multmarray_1 (a, b)
 multiply 1D fortran array and mesh arrays More...
 
pure real function, dimension(size(a%data2d, 1), size(a%data2d, 2)) multmarray_2 (a, b)
 multiply 2D fortran array and mesh arrays More...
 
pure real function, dimension(size(a%data3d, 1), size(a%data3d, 2), size(a%data3d, 3)) multmarray_3 (a, b)
 multiply 3D fortran array and mesh arrays More...
 
pure real function, dimension(size(a%data4d, 1), size(a%data4d, 2), size(a%data4d, 3), size(a%data4d, 4)) multmarray_4 (a, b)
 multiply 4D fortran array and mesh arrays More...
 
pure real function, dimension(size(a%data5d, 1), size(a%data5d, 2), size(a%data5d, 3), size(a%data5d, 4), size(a%data5d, 5)) multmarray_5 (a, b)
 multiply 5D fortran array and mesh arrays More...
 
subroutine destroy (this)
 deconstructor of the mesh array More...
 
type(selection_base) function createselection (idx)
 
subroutine cuboid (this, imin, imax, jmin, jmax, kmin, kmax)
 
subroutine everything (this)
 
subroutine destroy_selection (this)
 deconstructor of the mesh array More...
 

Detailed Description

base class for mesh arrays

Author
Tobias Illenseer

Function/Subroutine Documentation

◆ addmarray_0()

pure real function, dimension(size(a%data1d)) marray_base_mod::addmarray_0 ( class(marray_base), intent(in)  a,
class(marray_base), intent(in)  b 
)
private

add 2 mesh arrays

Definition at line 368 of file marray_base.f90.

◆ addmarray_1()

pure real function, dimension(size(a%data1d)) marray_base_mod::addmarray_1 ( class(marray_base), intent(in)  a,
real, dimension(size(a%data1d)), intent(in)  b 
)
private

add 1D fortran array and mesh array

Definition at line 379 of file marray_base.f90.

◆ addmarray_2()

pure real function, dimension(size(a%data2d,1),size(a%data2d,2)) marray_base_mod::addmarray_2 ( class(marray_base), intent(in)  a,
real, dimension(size(a%data2d,1),size(a%data2d,2)), intent(in)  b 
)
private

add 2D fortran array and mesh array

Definition at line 390 of file marray_base.f90.

◆ addmarray_3()

pure real function, dimension(size(a%data3d,1),size(a%data3d,2),size(a%data3d,3)) marray_base_mod::addmarray_3 ( class(marray_base), intent(in)  a,
real, dimension(size(a%data3d,1),size(a%data3d,2),size(a%data3d,3)), intent(in)  b 
)
private

add 3D fortran array and mesh array

Definition at line 401 of file marray_base.f90.

◆ addmarray_4()

pure real function, dimension(size(a%data4d,1),size(a%data4d,2),size(a%data4d,3), size(a%data4d,4)) marray_base_mod::addmarray_4 ( class(marray_base), intent(in)  a,
real, dimension(size(a%data4d,1),size(a%data4d,2),size(a%data4d,3), size(a%data4d,4)), intent(in)  b 
)
private

add 4D fortran array and mesh array

Definition at line 412 of file marray_base.f90.

◆ addmarray_5()

pure real function, dimension(size(a%data5d,1),size(a%data5d,2),size(a%data5d,3), size(a%data5d,4),size(a%data5d,5)) marray_base_mod::addmarray_5 ( class(marray_base), intent(in)  a,
real, dimension(size(a%data5d,1),size(a%data5d,2),size(a%data5d,3), size(a%data5d,4),size(a%data5d,5)), intent(in)  b 
)
private

add 5D fortran array and mesh array

Definition at line 425 of file marray_base.f90.

◆ assignmarray_0()

subroutine marray_base_mod::assignmarray_0 ( class(marray_base), intent(inout)  this,
class(marray_base), intent(in)  ma 
)
private

assigns one mesh array to another mesh array

Todo:
improve error handling for mesh arrays

Definition at line 254 of file marray_base.f90.

◆ assignmarray_1()

pure subroutine marray_base_mod::assignmarray_1 ( class(marray_base), intent(inout)  this,
real, dimension(inum*jnum*knum*this%dims(1)*this%dims(2)), intent(in)  a 
)
private

assign 1D fortran array to mesh array

Definition at line 315 of file marray_base.f90.

◆ assignmarray_2()

pure subroutine marray_base_mod::assignmarray_2 ( class(marray_base), intent(inout)  this,
real, dimension(size(this%data2d,1),size(this%data2d,2)), intent(in)  a 
)
private

assign 2D fortran array to mesh array

Definition at line 325 of file marray_base.f90.

◆ assignmarray_3()

pure subroutine marray_base_mod::assignmarray_3 ( class(marray_base), intent(inout)  this,
real, dimension(size(this%data3d,1),size(this%data3d,2),size(this%data3d,3)), intent(in)  a 
)
private

assign 3D fortran array to mesh array

Definition at line 335 of file marray_base.f90.

◆ assignmarray_4()

pure subroutine marray_base_mod::assignmarray_4 ( class(marray_base), intent(inout)  this,
real, dimension(size(this%data4d,1),size(this%data4d,2),size(this%data4d,3), size(this%data4d,4)), intent(in)  a 
)
private

assign 4D fortran array to mesh array

Definition at line 346 of file marray_base.f90.

◆ assignmarray_5()

pure subroutine marray_base_mod::assignmarray_5 ( class(marray_base), intent(inout)  this,
real, dimension(size(this%data5d,1),size(this%data5d,2),size(this%data5d,3), size(this%data5d,4),size(this%data5d,5)), intent(in)  a 
)
private

assign 5D fortran array to mesh array

Definition at line 357 of file marray_base.f90.

◆ assignpointers()

subroutine marray_base_mod::assignpointers ( class(marray_base), intent(inout)  this)

assign pointers of different shapes to the 1D data

Definition at line 178 of file marray_base.f90.

◆ closemeshproperties()

subroutine, public marray_base_mod::closemeshproperties ( )

unsets global mesh properties

This subroutine should be called only once in MeshClose.

Definition at line 169 of file marray_base.f90.

◆ createmarray()

type(marray_base) function marray_base_mod::createmarray ( integer, intent(in), optional  m,
integer, intent(in), optional  n 
)
private

constructor for mesh arrays

Definition at line 119 of file marray_base.f90.

◆ createselection()

type(selection_base) function marray_base_mod::createselection ( integer, dimension(6), optional  idx)
private

Definition at line 519 of file marray_base.f90.

◆ cuboid()

subroutine marray_base_mod::cuboid ( class(selection_base this,
integer, intent(in)  imin,
integer, intent(in)  imax,
integer, intent(in)  jmin,
integer, intent(in)  jmax,
integer, intent(in)  kmin,
integer, intent(in)  kmax 
)
private

Definition at line 545 of file marray_base.f90.

◆ destroy()

subroutine marray_base_mod::destroy ( class(marray_base this)
private

deconstructor of the mesh array

Definition at line 508 of file marray_base.f90.

◆ destroy_selection()

subroutine marray_base_mod::destroy_selection ( class(selection_base this)
private

deconstructor of the mesh array

Definition at line 589 of file marray_base.f90.

◆ everything()

subroutine marray_base_mod::everything ( class(selection_base this)
private

Definition at line 574 of file marray_base.f90.

◆ initmeshproperties()

subroutine, public marray_base_mod::initmeshproperties ( integer, intent(in)  igmin_,
integer, intent(in)  igmax_,
integer, intent(in)  jgmin_,
integer, intent(in)  jgmax_,
integer, intent(in)  kgmin_,
integer, intent(in)  kgmax_ 
)

sets global mesh properties

This subroutine should be called only once in MeshInit.

Definition at line 147 of file marray_base.f90.

◆ multmarray_0()

pure real function, dimension(size(a%data1d)) marray_base_mod::multmarray_0 ( class(marray_base), intent(in)  a,
class(marray_base), intent(in)  b 
)
private

multiply 2 mesh arrays

Definition at line 438 of file marray_base.f90.

◆ multmarray_1()

pure real function, dimension(size(a%data1d)) marray_base_mod::multmarray_1 ( class(marray_base), intent(in)  a,
real, dimension(size(a%data1d)), intent(in)  b 
)
private

multiply 1D fortran array and mesh arrays

Definition at line 449 of file marray_base.f90.

◆ multmarray_2()

pure real function, dimension(size(a%data2d,1),size(a%data2d,2)) marray_base_mod::multmarray_2 ( class(marray_base), intent(in)  a,
real, dimension(size(a%data2d,1),size(a%data2d,2)), intent(in)  b 
)
private

multiply 2D fortran array and mesh arrays

Definition at line 460 of file marray_base.f90.

◆ multmarray_3()

pure real function, dimension(size(a%data3d,1),size(a%data3d,2),size(a%data3d,3)) marray_base_mod::multmarray_3 ( class(marray_base), intent(in)  a,
real, dimension(size(a%data3d,1),size(a%data3d,2),size(a%data3d,3)), intent(in)  b 
)
private

multiply 3D fortran array and mesh arrays

Definition at line 471 of file marray_base.f90.

◆ multmarray_4()

pure real function, dimension(size(a%data4d,1),size(a%data4d,2),size(a%data4d,3), size(a%data4d,4)) marray_base_mod::multmarray_4 ( class(marray_base), intent(in)  a,
real, dimension(size(a%data4d,1),size(a%data4d,2),size(a%data4d,3), size(a%data4d,4)), intent(in)  b 
)
private

multiply 4D fortran array and mesh arrays

Definition at line 482 of file marray_base.f90.

◆ multmarray_5()

pure real function, dimension(size(a%data5d,1),size(a%data5d,2),size(a%data5d,3), size(a%data5d,4),size(a%data5d,5)) marray_base_mod::multmarray_5 ( class(marray_base), intent(in)  a,
real, dimension(size(a%data5d,1),size(a%data5d,2),size(a%data5d,3), size(a%data5d,4),size(a%data5d,5)), intent(in)  b 
)
private

multiply 5D fortran array and mesh arrays

Definition at line 495 of file marray_base.f90.

◆ remapbounds_0()

real function, dimension(:,:,:), pointer marray_base_mod::remapbounds_0 ( class(marray_base this,
real, dimension(igmin:,jgmin:,kgmin:), intent(in), target  array 
)

remap lower bounds in the first 3 dimensions of rank 0 mesh arrays

This is a short hack to obviate a restriction in the generation of subarray pointers. The indices of subarrays usually start with a lower bound of 1, but Fosite requires that all mesh data arrays start with lower bounds of IGMIN, JGMIN and KGMIN, which are not equal to 1 in general.

Parameters
this[in,out] this

Definition at line 210 of file marray_base.f90.

◆ remapbounds_1()

real function, dimension(:,:,:,:), pointer marray_base_mod::remapbounds_1 ( class(marray_base this,
real, dimension(igmin:,jgmin:,kgmin:,:), intent(in), target  array 
)

remap lower bounds in the first 3 dimensions of rank 1 mesh arrays

Parameters
this[in,out] this

Definition at line 224 of file marray_base.f90.

◆ remapbounds_2()

real function, dimension(:,:,:,:,:), pointer marray_base_mod::remapbounds_2 ( class(marray_base this,
real, dimension(igmin:,jgmin:,kgmin:,:,:), intent(in), target  array 
)

remap lower bounds in the first 3 dimensions of rank 2 mesh arrays

Parameters
this[in,out]

Definition at line 239 of file marray_base.f90.

Variable Documentation

◆ idx_init

logical, save marray_base_mod::idx_init = .FALSE.
private

init status

Definition at line 46 of file marray_base.f90.

◆ igmax

integer, save marray_base_mod::igmax
private

1st dim

Definition at line 42 of file marray_base.f90.

◆ igmin

integer, save marray_base_mod::igmin
private

Definition at line 42 of file marray_base.f90.

◆ inum

integer, save marray_base_mod::inum
private

Definition at line 45 of file marray_base.f90.

◆ jgmax

integer, save marray_base_mod::jgmax
private

2nd dim

Definition at line 43 of file marray_base.f90.

◆ jgmin

integer, save marray_base_mod::jgmin
private

Definition at line 43 of file marray_base.f90.

◆ jnum

integer, save marray_base_mod::jnum
private

Definition at line 45 of file marray_base.f90.

◆ kgmax

integer, save marray_base_mod::kgmax
private

3rd dim

Definition at line 44 of file marray_base.f90.

◆ kgmin

integer, save marray_base_mod::kgmin
private

Definition at line 44 of file marray_base.f90.

◆ knum

integer, save marray_base_mod::knum
private

array sizes

Definition at line 45 of file marray_base.f90.