FEDEM Solver  R8.0
Source code of the dynamics solver
Data Types | Functions/Subroutines | Variables
scratcharraymodule Module Reference

Module with subroutines for dynamic allocation of scratch arrays. More...

Data Types

interface  realscratcharray
 Returns a pointer to a real scratch array. More...
 

Functions/Subroutines

subroutine, private allocateiscr (nw, ierr)
 Reallocates the integer scratch array to fit at least the size. More...
 
subroutine, private allocatelscr (nw, ierr)
 Reallocates the logical scratch array to fit at least given size. More...
 
subroutine, private allocatesscr (nw, ierr)
 Reallocates the real(sp) scratch array to fit at least given size. More...
 
subroutine, private allocatedscr (nw, ierr)
 Reallocates the real(dp) scratch array to fit at least given size. More...
 
integer function, dimension(:), pointer getintegerscratcharray (nsize, ierr)
 Returns a pointer to an integer scratch array. More...
 
logical function, dimension(:), pointer getlogicalscratcharray (nsize, ierr)
 Returns a pointer to a logical scratch array. More...
 
real(sp) function, dimension(:), pointer getsinglescratcharray (nsize, ierr)
 Returns a pointer to a real(sp) scratch array. More...
 
real(dp) function, dimension(:), pointer getrealscratcharray (nsize, ierr)
 Returns a pointer to a real(dp) scratch array. More...
 
real(dp) function, dimension(:,:), pointer getrealscratchmatrix (nrow, ncol, ierr)
 Returns a pointer to a nrow×ncol real(dp) scratch array. More...
 
subroutine, private singlescratcharray (rscr, nsize, ierr)
 Returns a pointer to a real(sp) scratch array. More...
 
subroutine, private doublescratcharray (rscr, nsize, ierr)
 Returns a pointer to a real(dp) scratch array. More...
 
subroutine releasescratcharrays ()
 Deallocates the scratch arrays, if allocated. More...
 

Variables

integer, dimension(:), allocatable, target, save, private iscr
 Integer array. More...
 
logical, dimension(:), allocatable, target, save, private lscr
 Logical array. More...
 
real(sp), dimension(:), allocatable, target, save, private sscr
 Single precision. More...
 
real(dp), dimension(:), allocatable, target, save, private dscr
 Double precision. More...
 

Detailed Description

Module with subroutines for dynamic allocation of scratch arrays.

This module is provided to avoid frequent allocation and deallocation of temporary scratch arrays during the computations. It should NOT be used to transfer data between subroutines. That will be dangerous and may sooner or later lead to overwriting errors.

Knut Morten Okstad

Date
12 July 2002

Function/Subroutine Documentation

◆ allocatedscr()

subroutine, private scratcharraymodule::allocatedscr ( integer, intent(in)  nw,
integer, intent(out)  ierr 
)
private

Reallocates the real(dp) scratch array to fit at least given size.

◆ allocateiscr()

subroutine, private scratcharraymodule::allocateiscr ( integer, intent(in)  nw,
integer, intent(out)  ierr 
)
private

Reallocates the integer scratch array to fit at least the size.

◆ allocatelscr()

subroutine, private scratcharraymodule::allocatelscr ( integer, intent(in)  nw,
integer, intent(out)  ierr 
)
private

Reallocates the logical scratch array to fit at least given size.

Author
Knut Morten Okstad
Date
29 Jan 2004

◆ allocatesscr()

subroutine, private scratcharraymodule::allocatesscr ( integer, intent(in)  nw,
integer, intent(out)  ierr 
)
private

Reallocates the real(sp) scratch array to fit at least given size.

Author
Knut Morten Okstad
Date
20 Jan 2006

◆ doublescratcharray()

subroutine, private scratcharraymodule::doublescratcharray ( real(dp), dimension(:), pointer  rscr,
integer, intent(in)  nsize,
integer, intent(out)  ierr 
)
private

Returns a pointer to a real(dp) scratch array.

Author
Knut Morten Okstad
Date
10 Feb 2017

◆ getintegerscratcharray()

integer function, dimension(:), pointer scratcharraymodule::getintegerscratcharray ( integer, intent(in)  nsize,
integer, intent(out)  ierr 
)

Returns a pointer to an integer scratch array.

◆ getlogicalscratcharray()

logical function, dimension(:), pointer scratcharraymodule::getlogicalscratcharray ( integer, intent(in)  nsize,
integer, intent(out)  ierr 
)

Returns a pointer to a logical scratch array.

Author
Knut Morten Okstad
Date
29 Jan 2004

◆ getrealscratcharray()

real(dp) function, dimension(:), pointer scratcharraymodule::getrealscratcharray ( integer, intent(in)  nsize,
integer, intent(out)  ierr 
)

Returns a pointer to a real(dp) scratch array.

◆ getrealscratchmatrix()

real(dp) function, dimension(:,:), pointer scratcharraymodule::getrealscratchmatrix ( integer, intent(in)  nrow,
integer, intent(in)  ncol,
integer, intent(out)  ierr 
)

Returns a pointer to a nrow×ncol real(dp) scratch array.

◆ getsinglescratcharray()

real(sp) function, dimension(:), pointer scratcharraymodule::getsinglescratcharray ( integer, intent(in)  nsize,
integer, intent(out)  ierr 
)

Returns a pointer to a real(sp) scratch array.

◆ releasescratcharrays()

subroutine scratcharraymodule::releasescratcharrays

Deallocates the scratch arrays, if allocated.

Author
Knut Morten Okstad
Date
15 Jan 2003

◆ singlescratcharray()

subroutine, private scratcharraymodule::singlescratcharray ( real(sp), dimension(:), pointer  rscr,
integer, intent(in)  nsize,
integer, intent(out)  ierr 
)
private

Returns a pointer to a real(sp) scratch array.

Author
Knut Morten Okstad
Date
10 Feb 2017

Variable Documentation

◆ dscr

real(dp), dimension(:), allocatable, target, save, private scratcharraymodule::dscr
private

Double precision.

◆ iscr

integer, dimension(:), allocatable, target, save, private scratcharraymodule::iscr
private

Integer array.

◆ lscr

logical, dimension(:), allocatable, target, save, private scratcharraymodule::lscr
private

Logical array.

◆ sscr

real(sp), dimension(:), allocatable, target, save, private scratcharraymodule::sscr
private

Single precision.