SABER
type_linop Module Reference

Linear operator derived type. More...

Data Types

type  interp_type
 
type  linop_type
 

Functions/Subroutines

subroutine interp_dealloc (interp_data)
 Release memory. More...
 
subroutine linop_alloc (linop, nvec)
 Allocation. More...
 
subroutine linop_dealloc (linop)
 Release memory. More...
 
subroutine linop_copy (linop_out, linop_in, n_s)
 Copy. More...
 
subroutine linop_read (linop, mpl, ncid)
 Read. More...
 
subroutine linop_write (linop, mpl, ncid)
 Write. More...
 
subroutine linop_buffer_size (linop, nbufi, nbufr)
 Buffer size. More...
 
subroutine linop_serialize (linop, mpl, nbufi, nbufr, bufi, bufr)
 Serialize. More...
 
subroutine linop_deserialize (linop, mpl, nbufi, nbufr, bufi, bufr)
 Deserialize. More...
 
subroutine linop_apply (linop, mpl, fld_src, fld_dst, ivec, mssrc, msdst)
 Apply linear operator. More...
 
subroutine linop_apply_ad (linop, mpl, fld_dst, fld_src, ivec)
 Apply linear operator, adjoint. More...
 
subroutine linop_apply_sym (linop, mpl, fld, ivec)
 Apply linear operator, symmetric. More...
 
subroutine linop_add_op (linop, n_s, row, col, S)
 Add operation. More...
 
subroutine linop_gather (linop, mpl, n_s_arr, linop_arr)
 Gather data from OpenMP threads. More...
 
subroutine linop_interp (linop, mpl, rng, nam, geom, il0, n_src, lon_src, lat_src, mask_src, n_dst, lon_dst, lat_dst, mask_dst, ifmt)
 Compute horizontal interpolation. More...
 

Variables

logical, parameter check_data = .false.
 
real(kind_real), parameter s_inf = 1.0e-2_kind_real
 

Detailed Description

Linear operator derived type.

Function/Subroutine Documentation

◆ interp_dealloc()

subroutine type_linop::interp_dealloc ( class(interp_type), intent(inout)  interp_data)
private

Release memory.

Parameters
[in,out]interp_dataInterpolation data

Definition at line 79 of file type_linop.F90.

◆ linop_add_op()

subroutine type_linop::linop_add_op ( class(linop_type), intent(inout)  linop,
integer, intent(inout)  n_s,
integer, intent(in)  row,
integer, intent(in)  col,
real(kind_real), intent(in)  S 
)
private

Add operation.

Parameters
[in,out]linopLinear operators
[in,out]n_sNumber of operations
[in]rowRow index
[in]colColumn index
[in]sValue

Definition at line 697 of file type_linop.F90.

◆ linop_alloc()

subroutine type_linop::linop_alloc ( class(linop_type), intent(inout)  linop,
integer, intent(in), optional  nvec 
)
private

Allocation.

Parameters
[in,out]linopLinear operator
[in]nvecSize of the vector of linear operators with similar row and col

Definition at line 99 of file type_linop.F90.

◆ linop_apply()

subroutine type_linop::linop_apply ( class(linop_type), intent(in)  linop,
type(mpl_type), intent(inout)  mpl,
real(kind_real), dimension(linop%n_src), intent(in)  fld_src,
real(kind_real), dimension(linop%n_dst), intent(out)  fld_dst,
integer, intent(in), optional  ivec,
logical, intent(in), optional  mssrc,
logical, intent(in), optional  msdst 
)
private

Apply linear operator.

Parameters
[in]linopLinear operator
[in,out]mplMPI data
[in]fld_srcSource vector
[out]fld_dstDestination vector
[in]ivecIndex of the vector of linear operators with similar row and col
[in]mssrcCheck for missing source
[in]msdstCheck for missing destination

Definition at line 467 of file type_linop.F90.

◆ linop_apply_ad()

subroutine type_linop::linop_apply_ad ( class(linop_type), intent(in)  linop,
type(mpl_type), intent(inout)  mpl,
real(kind_real), dimension(linop%n_dst), intent(in)  fld_dst,
real(kind_real), dimension(linop%n_src), intent(out)  fld_src,
integer, intent(in), optional  ivec 
)
private

Apply linear operator, adjoint.

Parameters
[in]linopLinear operator
[in,out]mplMPI data
[in]fld_dstDestination vector
[out]fld_srcSource vector
[in]ivecIndex of the vector of linear operators with similar row and col

Definition at line 574 of file type_linop.F90.

◆ linop_apply_sym()

subroutine type_linop::linop_apply_sym ( class(linop_type), intent(in)  linop,
type(mpl_type), intent(inout)  mpl,
real(kind_real), dimension(linop%n_src), intent(inout)  fld,
integer, intent(in), optional  ivec 
)
private

Apply linear operator, symmetric.

Parameters
[in]linopLinear operator
[in,out]mplMPI data
[in,out]fldSource/destination vector
[in]ivecIndex of the vector of linear operators with similar row and col

Definition at line 630 of file type_linop.F90.

◆ linop_buffer_size()

subroutine type_linop::linop_buffer_size ( class(linop_type), intent(in)  linop,
integer, intent(out)  nbufi,
integer, intent(out)  nbufr 
)
private

Buffer size.

Parameters
[in]linopLinear operator
[out]nbufiBuffer size (integer)
[out]nbufrBuffer size (real)

Definition at line 294 of file type_linop.F90.

◆ linop_copy()

subroutine type_linop::linop_copy ( class(linop_type), intent(inout)  linop_out,
type(linop_type), intent(in)  linop_in,
integer, intent(in), optional  n_s 
)
private

Copy.

Parameters
[in,out]linop_outOutput linear operator
[in]linop_inInput linear operator
[in]n_sNumber of operations to copy

Definition at line 149 of file type_linop.F90.

◆ linop_dealloc()

subroutine type_linop::linop_dealloc ( class(linop_type), intent(inout)  linop)
private

Release memory.

Parameters
[in,out]linopLinear operator

Definition at line 129 of file type_linop.F90.

◆ linop_deserialize()

subroutine type_linop::linop_deserialize ( class(linop_type), intent(inout)  linop,
type(mpl_type), intent(inout)  mpl,
integer, intent(in)  nbufi,
integer, intent(in)  nbufr,
integer, dimension(nbufi), intent(in)  bufi,
real(kind_real), dimension(nbufr), intent(in)  bufr 
)
private

Deserialize.

Parameters
[in,out]linopLinear operator
[in,out]mplMPI data
[in]nbufiBuffer size (integer)
[in]nbufrBuffer size (real)
[in]bufiBuffer (integer)
[in]bufrBuffer (real)

Definition at line 389 of file type_linop.F90.

◆ linop_gather()

subroutine type_linop::linop_gather ( class(linop_type), intent(inout)  linop,
type(mpl_type), intent(inout)  mpl,
integer, dimension(mpl%nthread), intent(in)  n_s_arr,
type(linop_type), dimension(mpl%nthread), intent(in)  linop_arr 
)
private

Gather data from OpenMP threads.

Parameters
[in,out]linopLinear operator
[in,out]mplMPI data
[in]n_s_arrNumber of operations
[in]linop_arrLinear operator array

Definition at line 742 of file type_linop.F90.

◆ linop_interp()

subroutine type_linop::linop_interp ( class(linop_type), intent(inout)  linop,
type(mpl_type), intent(inout)  mpl,
type(rng_type), intent(inout)  rng,
type(nam_type), intent(in)  nam,
type(geom_type), intent(in)  geom,
integer, intent(in)  il0,
integer, intent(in)  n_src,
real(kind_real), dimension(n_src), intent(in)  lon_src,
real(kind_real), dimension(n_src), intent(in)  lat_src,
logical, dimension(n_src), intent(in)  mask_src,
integer, intent(in)  n_dst,
real(kind_real), dimension(n_dst), intent(in)  lon_dst,
real(kind_real), dimension(n_dst), intent(in)  lat_dst,
logical, dimension(n_dst), intent(in)  mask_dst,
integer, intent(in)  ifmt 
)
private

Compute horizontal interpolation.

Parameters
[in,out]linopLinear operator
[in,out]mplMPI data
[in,out]rngRandom number generator
[in]namNamelist
[in]geomGeometry
[in]il0Level
[in]n_srcSource size
[in]lon_srcSource longitudes
[in]lat_srcSource latitudes
[in]mask_srcSource mask
[in]n_dstDestination size
[in]lon_dstDestination longitudes
[in]lat_dstDestination latitudes
[in]mask_dstDestination mask
[in]ifmtFormat indentation

Definition at line 781 of file type_linop.F90.

Here is the call graph for this function:

◆ linop_read()

subroutine type_linop::linop_read ( class(linop_type), intent(inout)  linop,
type(mpl_type), intent(inout)  mpl,
integer, intent(in)  ncid 
)
private

Read.

Parameters
[in,out]linopLinear operator
[in,out]mplMPI data
[in]ncidNetCDF file

Definition at line 191 of file type_linop.F90.

◆ linop_serialize()

subroutine type_linop::linop_serialize ( class(linop_type), intent(in)  linop,
type(mpl_type), intent(inout)  mpl,
integer, intent(in)  nbufi,
integer, intent(in)  nbufr,
integer, dimension(nbufi), intent(out)  bufi,
real(kind_real), dimension(nbufr), intent(out)  bufr 
)
private

Serialize.

Parameters
[in]linopLinear operator
[in,out]mplMPI data
[in]nbufiBuffer size (integer)
[in]nbufrBuffer size (real)
[out]bufiBuffer (integer)
[out]bufrBuffer (real)

Definition at line 317 of file type_linop.F90.

◆ linop_write()

subroutine type_linop::linop_write ( class(linop_type), intent(in)  linop,
type(mpl_type), intent(inout)  mpl,
integer, intent(in)  ncid 
)
private

Write.

Parameters
[in]linopLinear operator
[in,out]mplMPI data
[in]ncidNetCDF file

Definition at line 243 of file type_linop.F90.

Variable Documentation

◆ check_data

logical, parameter type_linop::check_data = .false.

Definition at line 23 of file type_linop.F90.

◆ s_inf

real(kind_real), parameter type_linop::s_inf = 1.0e-2_kind_real

Definition at line 24 of file type_linop.F90.