The Open FUSION Toolkit 1.0.0-8905cc5
Modeling tools for plasma and fusion research and engineering
Loading...
Searching...
No Matches
Data Types | Functions/Subroutines
oft_lu Module Reference

Detailed Description

Native module for direct solves. Available interfaces:

Note
Currently supports local solves only.
Authors
Chris Hansen
Date
May 2014

Data Types

interface  lapack_cholesky
 
interface  lapack_matinv
 Interface to dgssv from UMFPACK. More...
 
type  native_ilu_struc
 Native ILU(0) preconditioner information object. More...
 
type  oft_ilusolver
 ILU solver class. More...
 
type  oft_lusolver
 LU solver class. More...
 
type  pardiso_struc
 Pardiso solver information. More...
 
type  superlu_struc
 SuperLU solver information. More...
 

Functions/Subroutines

subroutine convert_csr_to_csc (csr_graph, csc_graph, map)
 Convert csr graph to csc storage.
 
subroutine ilu0 (n, a, lc, kr, alu, jlu, ju, ierr)
 Native Incomplete LU factorization with no fill.
 
recursive subroutine ilusolver_apply (self, u, g)
 Solve a linear system using a direct solve.
 
recursive logical function ilusolver_check_thread (self)
 Check for thread safety.
 
subroutine ilusolver_delete (self)
 Destroy direct solver and deallocate all internal storage.
 
subroutine ilusolver_setup_xml (self, solver_node, level)
 Setup solver from XML definition.
 
recursive subroutine ilusolver_update (self, new_pattern)
 Update solver after changing settings/operators.
 
subroutine lapack_cholesky_real (nrows, amat, error)
 Needs Docs.
 
subroutine lapack_matinv_complex (nrows, amat, error)
 Needs Docs.
 
subroutine lapack_matinv_real (nrows, amat, error)
 Needs Docs.
 
subroutine lusol (n, nrhs, x, alu, jlu, ju)
 Approximate solve using ILU(0) factorization produced by ilu0.
 
recursive subroutine lusolver_apply (self, u, g)
 Solve a linear system using a direct solve.
 
recursive logical function lusolver_check_thread (self)
 Check for thread safety.
 
subroutine lusolver_delete (self)
 Destroy direct solver and deallocate all internal storage.
 
subroutine lusolver_setup_xml (self, solver_node, level)
 Setup solver from XML definition.
 
recursive subroutine lusolver_update (self, new_pattern)
 Update solver after changing settings/operators.
 

Function/Subroutine Documentation

◆ convert_csr_to_csc()

subroutine convert_csr_to_csc ( type(oft_graph), intent(inout)  csr_graph,
type(oft_graph), intent(inout)  csc_graph,
integer(i4), dimension(:), intent(inout)  map 
)
private

Convert csr graph to csc storage.

Parameters
[in,out]csr_graphOriginal graph in csr format
[in,out]csc_graphResulting graph in csc format
[in,out]mapMapping from csr entries to csc entries

◆ ilu0()

subroutine ilu0 ( integer(4), intent(in)  n,
real(8), dimension(:), intent(in), contiguous  a,
integer(4), dimension(:), intent(inout), contiguous  lc,
integer(4), dimension(:), intent(inout), contiguous  kr,
real(8), dimension(:), intent(inout), contiguous  alu,
integer(4), dimension(:), intent(inout), contiguous  jlu,
integer(4), dimension(:), intent(inout), contiguous  ju,
integer(4), intent(out)  ierr 
)
private

Native Incomplete LU factorization with no fill.

Based on ILU++ by Mayer (https://dx.doi.org/10.1002/pamm.200700911)

Note
Requires CSR graph with sorted column list and diagonal entries
Parameters
[in]nSize of matrix
[in]aMatrix entries
[in,out]aluEntries for L/U factors
[in,out]lcColumn indices
[in,out]krRow pointer
[in,out]jluColumn indices for alu
[in,out]juDiagonal indices for alu
[out]ierrError flag

◆ ilusolver_apply()

recursive subroutine ilusolver_apply ( class(oft_ilusolver), intent(inout)  self,
class(oft_vector), intent(inout)  u,
class(oft_vector), intent(inout)  g 
)
private

Solve a linear system using a direct solve.

Parameters
[in,out]uGuess/Solution field
[in,out]gRHS/Residual field

◆ ilusolver_check_thread()

recursive logical function ilusolver_check_thread ( class(oft_ilusolver), intent(inout)  self)
private

Check for thread safety.

◆ ilusolver_delete()

subroutine ilusolver_delete ( class(oft_ilusolver), intent(inout)  self)
private

Destroy direct solver and deallocate all internal storage.

◆ ilusolver_setup_xml()

subroutine ilusolver_setup_xml ( class(oft_ilusolver), intent(inout)  self,
type(xml_node), intent(in), pointer  solver_node,
integer(i4), intent(in), optional  level 
)
private

Setup solver from XML definition.

Parameters
[in]solver_nodeXML node containing solver definition
[in]levelLevel in MG hierarchy (optional)

◆ ilusolver_update()

recursive subroutine ilusolver_update ( class(oft_ilusolver), intent(inout)  self,
logical, intent(in), optional  new_pattern 
)
private

Update solver after changing settings/operators.

Parameters
[in]new_patternUpdate matrix pattern (optional)

◆ lapack_cholesky_real()

subroutine lapack_cholesky_real ( integer(4), intent(in)  nrows,
real(8), dimension(nrows,nrows), intent(inout)  amat,
integer(4), intent(out)  error 
)
private

Needs Docs.

Parameters
[in]nrowsNumber of rows/columns
[in,out]amatMatrix to invert
[out]errorError flag

◆ lapack_matinv_complex()

subroutine lapack_matinv_complex ( integer(i4), intent(in)  nrows,
double complex, dimension(nrows,nrows), intent(inout)  amat,
integer(4), intent(out)  error 
)
private

Needs Docs.

Parameters
[in]nrowsNumber of rows/columns
[in,out]amatMatrix to invert
[out]errorError flag

◆ lapack_matinv_real()

subroutine lapack_matinv_real ( integer(4), intent(in)  nrows,
real(8), dimension(nrows,nrows), intent(inout)  amat,
integer(4), intent(out)  error 
)
private

Needs Docs.

Parameters
[in]nrowsNumber of rows/columns
[in,out]amatMatrix to invert
[out]errorError flag

◆ lusol()

subroutine lusol ( integer(4), intent(in)  n,
integer(4), intent(in)  nrhs,
real(8), dimension(n,nrhs), intent(inout)  x,
real(8), dimension(:), intent(in), contiguous  alu,
integer(4), dimension(:), intent(in), contiguous  jlu,
integer(4), dimension(:), intent(in), contiguous  ju 
)
private

Approximate solve using ILU(0) factorization produced by ilu0.

Parameters
[in]nSize of matrix
[in]nrhsNumber of RHS to solve
[in,out]xInput: RHS, Output: Solution
[in]aluEntries for L/U factors
[in]jluColumn indices for alu
[in]juDiagonal indices for alu

◆ lusolver_apply()

recursive subroutine lusolver_apply ( class(oft_lusolver), intent(inout)  self,
class(oft_vector), intent(inout)  u,
class(oft_vector), intent(inout)  g 
)
private

Solve a linear system using a direct solve.

Parameters
[in,out]uGuess/Solution field
[in,out]gRHS/Residual field

◆ lusolver_check_thread()

recursive logical function lusolver_check_thread ( class(oft_lusolver), intent(inout)  self)
private

Check for thread safety.

◆ lusolver_delete()

subroutine lusolver_delete ( class(oft_lusolver), intent(inout)  self)
private

Destroy direct solver and deallocate all internal storage.

◆ lusolver_setup_xml()

subroutine lusolver_setup_xml ( class(oft_lusolver), intent(inout)  self,
type(xml_node), intent(in), pointer  solver_node,
integer(i4), intent(in), optional  level 
)
private

Setup solver from XML definition.

Parameters
[in]solver_nodeXML node containing solver definition
[in]levelLevel in MG hierarchy (optional)

◆ lusolver_update()

recursive subroutine lusolver_update ( class(oft_lusolver), intent(inout)  self,
logical, intent(in), optional  new_pattern 
)
private

Update solver after changing settings/operators.

Parameters
[in]new_patternUpdate matrix pattern (optional)