0.6.2-dev0
FORCES
FORtran lib for Comp. Env. Sys.
Loading...
Searching...
No Matches
mo_append::paste Interface Reference

Paste (columns) scalars, vectors, and matrixes onto existing array. More...

Public Member Functions

subroutine paste_i4_m_s (mat1, sca2)
 
subroutine paste_i4_m_v (mat1, vec2, fill_value)
 
subroutine paste_i4_m_m (mat1, mat2, fill_value)
 
subroutine paste_i8_m_s (mat1, sca2)
 
subroutine paste_i8_m_v (mat1, vec2, fill_value)
 
subroutine paste_i8_m_m (mat1, mat2, fill_value)
 
subroutine paste_sp_m_s (mat1, sca2)
 
subroutine paste_sp_m_v (mat1, vec2, fill_value)
 
subroutine paste_sp_m_m (mat1, mat2, fill_value)
 
subroutine paste_dp_m_s (mat1, sca2)
 
subroutine paste_dp_m_v (mat1, vec2, fill_value)
 
subroutine paste_dp_m_m (mat1, mat2, fill_value)
 
subroutine paste_char_m_s (mat1, sca2)
 
subroutine paste_char_m_v (mat1, vec2, fill_value)
 
subroutine paste_char_m_m (mat1, mat2, fill_value)
 
subroutine paste_lgt_m_s (mat1, sca2)
 
subroutine paste_lgt_m_v (mat1, vec2)
 
subroutine paste_lgt_m_m (mat1, mat2)
 
subroutine paste_dp_3d (mat1, mat2)
 
subroutine paste_dp_4d (mat1, mat2)
 
subroutine paste_i4_3d (mat1, mat2)
 
subroutine paste_i4_4d (mat1, mat2)
 

Detailed Description

Paste (columns) scalars, vectors, and matrixes onto existing array.

Pastes one input to the columns of another, i.e. append on the second dimension. Paste variants for 3d and 4d also exists.
The input might be a scalar, a vector or a matrix.
Possibilities are:

  1. paste scalar to one-line matrix
  2. paste vector to a matrix
  3. paste matrix to matrix

Example

Paste input2 to input1.

input1 = (/ 1.0_dp , 2.0_dp /)
input2 = (/ 3.0_dp , 4.0_dp /)
call paste(input1, input2)
--> input1(1,:) = (/ 1.0_dp , 3.0_dp /)
input1(2,:) = (/ 2.0_dp , 4.0_dp /)

See also test folder for a detailed example, "test/test_mo_append".

Parameters
[in]input2Values to paste. Can be integer(i4/i8), real(sp/dp), logical, or character(len=*) and also scalar, dimension(:), or dimension(:,:).
Includes 3d and 4d version for real(dp) and integer(i4), where paste is always done along the last dimension.
If not scalar then the rows have to agree with input1.
[in,out]allocatable :: input1Array to be pasted to. Can be integer(i4/i8), real(sp/dp), or character(len=*). Must be dimension(:), dimension(:,:), dimension(:,:,:), or dimension(:,:,:,:) and allocatable.
If input2 is not scalar then it must be size(input1,1) = size(input2,1).
[in]optional :: fill_valueFiller value if number of rows do not coincide. Then the largest row will be taken and empty elements from the generated rows will be filled by this value.
Note
Size of input1 and input2 have to fit together, i.e. number of rows input1 = number of rows input2
Author
Juliane Mai
Date
Aug 2012
Author
Matthias Cuntz
Date
Jan 2013
  • removed 256 character restriction
Feb 2013
  • logical append and paste

Definition at line 168 of file mo_append.f90.

Member Function/Subroutine Documentation

◆ paste_char_m_m()

subroutine mo_append::paste::paste_char_m_m ( character(len=*), dimension(:,:), intent(inout), allocatable  mat1,
character(len=*), dimension(:,:), intent(in)  mat2,
character(len=*), intent(in), optional  fill_value 
)

Definition at line 2404 of file mo_append.f90.

◆ paste_char_m_s()

subroutine mo_append::paste::paste_char_m_s ( character(len=*), dimension(:,:), intent(inout), allocatable  mat1,
character(len=*), intent(in)  sca2 
)

Definition at line 2316 of file mo_append.f90.

◆ paste_char_m_v()

subroutine mo_append::paste::paste_char_m_v ( character(len=*), dimension(:,:), intent(inout), allocatable  mat1,
character(len=*), dimension(:), intent(in)  vec2,
character(len=*), intent(in), optional  fill_value 
)

Definition at line 2348 of file mo_append.f90.

◆ paste_dp_3d()

subroutine mo_append::paste::paste_dp_3d ( real(dp), dimension(:,:,:), intent(inout), allocatable  mat1,
real(dp), dimension(:,:,:), intent(in)  mat2 
)

Definition at line 2144 of file mo_append.f90.

◆ paste_dp_4d()

subroutine mo_append::paste::paste_dp_4d ( real(dp), dimension(:,:,:,:), intent(inout), allocatable  mat1,
real(dp), dimension(:,:,:,:), intent(in)  mat2 
)

Definition at line 2184 of file mo_append.f90.

◆ paste_dp_m_m()

subroutine mo_append::paste::paste_dp_m_m ( real(dp), dimension(:,:), intent(inout), allocatable  mat1,
real(dp), dimension(:,:), intent(in)  mat2,
real(dp), intent(in), optional  fill_value 
)

Definition at line 2088 of file mo_append.f90.

◆ paste_dp_m_s()

subroutine mo_append::paste::paste_dp_m_s ( real(dp), dimension(:,:), intent(inout), allocatable  mat1,
real(dp), intent(in)  sca2 
)

Definition at line 2000 of file mo_append.f90.

◆ paste_dp_m_v()

subroutine mo_append::paste::paste_dp_m_v ( real(dp), dimension(:,:), intent(inout), allocatable  mat1,
real(dp), dimension(:), intent(in)  vec2,
real(dp), intent(in), optional  fill_value 
)

Definition at line 2032 of file mo_append.f90.

◆ paste_i4_3d()

subroutine mo_append::paste::paste_i4_3d ( integer(i4), dimension(:,:,:), intent(inout), allocatable  mat1,
integer(i4), dimension(:,:,:), intent(in)  mat2 
)

Definition at line 2230 of file mo_append.f90.

◆ paste_i4_4d()

subroutine mo_append::paste::paste_i4_4d ( integer(i4), dimension(:,:,:,:), intent(inout), allocatable  mat1,
integer(i4), dimension(:,:,:,:), intent(in)  mat2 
)

Definition at line 2270 of file mo_append.f90.

◆ paste_i4_m_m()

subroutine mo_append::paste::paste_i4_m_m ( integer(i4), dimension(:,:), intent(inout), allocatable  mat1,
integer(i4), dimension(:,:), intent(in)  mat2,
integer(i4), intent(in), optional  fill_value 
)

Definition at line 1655 of file mo_append.f90.

◆ paste_i4_m_s()

subroutine mo_append::paste::paste_i4_m_s ( integer(i4), dimension(:,:), intent(inout), allocatable  mat1,
integer(i4), intent(in)  sca2 
)

Definition at line 1567 of file mo_append.f90.

◆ paste_i4_m_v()

subroutine mo_append::paste::paste_i4_m_v ( integer(i4), dimension(:,:), intent(inout), allocatable  mat1,
integer(i4), dimension(:), intent(in)  vec2,
integer(i4), intent(in), optional  fill_value 
)

Definition at line 1599 of file mo_append.f90.

◆ paste_i8_m_m()

subroutine mo_append::paste::paste_i8_m_m ( integer(i8), dimension(:,:), intent(inout), allocatable  mat1,
integer(i8), dimension(:,:), intent(in)  mat2,
integer(i8), intent(in), optional  fill_value 
)

Definition at line 1799 of file mo_append.f90.

◆ paste_i8_m_s()

subroutine mo_append::paste::paste_i8_m_s ( integer(i8), dimension(:,:), intent(inout), allocatable  mat1,
integer(i8), intent(in)  sca2 
)

Definition at line 1711 of file mo_append.f90.

◆ paste_i8_m_v()

subroutine mo_append::paste::paste_i8_m_v ( integer(i8), dimension(:,:), intent(inout), allocatable  mat1,
integer(i8), dimension(:), intent(in)  vec2,
integer(i8), intent(in), optional  fill_value 
)

Definition at line 1743 of file mo_append.f90.

◆ paste_lgt_m_m()

subroutine mo_append::paste::paste_lgt_m_m ( logical, dimension(:,:), intent(inout), allocatable  mat1,
logical, dimension(:,:), intent(in)  mat2 
)

Definition at line 2530 of file mo_append.f90.

◆ paste_lgt_m_s()

subroutine mo_append::paste::paste_lgt_m_s ( logical, dimension(:,:), intent(inout), allocatable  mat1,
logical, intent(in)  sca2 
)

Definition at line 2460 of file mo_append.f90.

◆ paste_lgt_m_v()

subroutine mo_append::paste::paste_lgt_m_v ( logical, dimension(:,:), intent(inout), allocatable  mat1,
logical, dimension(:), intent(in)  vec2 
)

Definition at line 2492 of file mo_append.f90.

◆ paste_sp_m_m()

subroutine mo_append::paste::paste_sp_m_m ( real(sp), dimension(:,:), intent(inout), allocatable  mat1,
real(sp), dimension(:,:), intent(in)  mat2,
real(sp), intent(in), optional  fill_value 
)

Definition at line 1943 of file mo_append.f90.

◆ paste_sp_m_s()

subroutine mo_append::paste::paste_sp_m_s ( real(sp), dimension(:,:), intent(inout), allocatable  mat1,
real(sp), intent(in)  sca2 
)

Definition at line 1855 of file mo_append.f90.

◆ paste_sp_m_v()

subroutine mo_append::paste::paste_sp_m_v ( real(sp), dimension(:,:), intent(inout), allocatable  mat1,
real(sp), dimension(:), intent(in)  vec2,
real(sp), intent(in), optional  fill_value 
)

Definition at line 1887 of file mo_append.f90.


The documentation for this interface was generated from the following file: