Skip to content

Commit

Permalink
[batch 1 of 100] developers documenation
Browse files Browse the repository at this point in the history
  • Loading branch information
neelravi committed Sep 19, 2024
1 parent 1b91436 commit c7e11ba
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 35 deletions.
26 changes: 13 additions & 13 deletions docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = "README.md" "../src/vmc" "../src/dmc" "../src/include"
INPUT = "README.md" "../src/vmc" "../src/dmc" "../src/module" "../src/parser"

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -1202,15 +1202,15 @@ HTML_EXTRA_FILES =
# Minimum value: 0, maximum value: 359, default value: 220.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_HUE = 0

# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
# in the HTML output. For a value of 0 the output will use grayscales only. A
# value of 255 will produce the most vivid colors.
# Minimum value: 0, maximum value: 255, default value: 100.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_SAT = 0

# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
# luminance component of the colors in the HTML output. Values below 100
Expand All @@ -1221,7 +1221,7 @@ HTML_COLORSTYLE_SAT = 100
# Minimum value: 40, maximum value: 240, default value: 80.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_COLORSTYLE_GAMMA = 80
HTML_COLORSTYLE_GAMMA = 100

# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
# page will contain the date and time when the page was generated. Setting this
Expand All @@ -1230,7 +1230,7 @@ HTML_COLORSTYLE_GAMMA = 80
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_TIMESTAMP = NO
HTML_TIMESTAMP = YES

# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
# documentation will contain a main index with vertical navigation menus that
Expand All @@ -1241,15 +1241,15 @@ HTML_TIMESTAMP = NO
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_DYNAMIC_MENUS = NO
HTML_DYNAMIC_MENUS = YES

# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
# page has loaded.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_DYNAMIC_SECTIONS = NO
HTML_DYNAMIC_SECTIONS = YES

# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
# shown in the various tree structured indices initially; the user can expand
Expand All @@ -1262,7 +1262,7 @@ HTML_DYNAMIC_SECTIONS = NO
# Minimum value: 0, maximum value: 9999, default value: 100.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_INDEX_NUM_ENTRIES = 100
HTML_INDEX_NUM_ENTRIES = 1000

# If the GENERATE_DOCSET tag is set to YES, additional index files will be
# generated that can be used as input for Apple's Xcode 3 integrated development
Expand Down Expand Up @@ -1478,7 +1478,7 @@ DISABLE_INDEX = NO
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

GENERATE_TREEVIEW = NO
GENERATE_TREEVIEW = YES

# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
# doxygen will group on one line in the generated HTML documentation.
Expand Down Expand Up @@ -1666,7 +1666,7 @@ EXTRA_SEARCH_MAPPINGS =
# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
# The default value is: YES.

GENERATE_LATEX = YES
GENERATE_LATEX = NO

# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
Expand Down Expand Up @@ -2315,7 +2315,7 @@ UML_LIMIT_NUM_FIELDS = 10
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.

TEMPLATE_RELATIONS = NO
TEMPLATE_RELATIONS = YES

# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
# YES then doxygen will generate a graph for each documented file showing the
Expand Down Expand Up @@ -2357,7 +2357,7 @@ CALL_GRAPH = YES
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.

CALLER_GRAPH = NO
CALLER_GRAPH = YES

# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
# hierarchy of all classes instead of a textual one.
Expand Down Expand Up @@ -2388,7 +2388,7 @@ DIRECTORY_GRAPH = YES
# The default value is: png.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_IMAGE_FORMAT = png
DOT_IMAGE_FORMAT = svg

# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning.
Expand Down
56 changes: 34 additions & 22 deletions src/vmc/array_utils.f90
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
!> Utility module for array manipulation
!> @author Viktor Azizi
!> @author Alice Cuzzocrea
!> @author Ravindra Shinde
!> @author Nico Renaud
!> @date 24/05/2022
module array_utils

use lapack_wrapper, only: lapack_matrix_vector,lapack_sort
Expand All @@ -14,8 +20,8 @@ module array_utils

contains

!> Create an identity matrix
pure function eye(m, n, alpha)
!> Create a matrix with ones in the diagonal and zero everywhere else
!> \param m: number of rows
!> \param n: number of colums
!> \param alpha: optional diagonal value
Expand Down Expand Up @@ -53,6 +59,7 @@ pure function eye(m, n, alpha)

end function eye

!> Create a diagnoal matrix from a vector
pure function diag_mat(vec)
real(dp), dimension(:), intent(in) :: vec
real(dp), dimension(size(vec, 1), size(vec, 1)) :: diag_mat
Expand All @@ -65,18 +72,17 @@ pure function diag_mat(vec)

end function diag_mat

!> compute the norm-2 of a vector
pure function norm(vector)
!> compute the norm-2 of a vector
real(dp), dimension(:), intent(in) :: vector
real(dp) :: norm

norm = sqrt(sum(vector**2.d0))

end function norm

!> Concatenate two matrices
subroutine concatenate(arr, brr)

!> Concatenate two matrices
!> \param arr: first array
!> \param brr: second array
!>
Expand Down Expand Up @@ -106,8 +112,8 @@ subroutine concatenate(arr, brr)

end subroutine concatenate

!> Generate a diagonal dominant square matrix of dimension m
function generate_diagonal_dominant(m, sparsity, diag_val) result(arr)
!> Generate a diagonal dominant square matrix of dimension m
!> \param m dimension of the matrix
!> \param sparsity magnitude order of the off-diagonal values

Expand Down Expand Up @@ -135,8 +141,9 @@ function generate_diagonal_dominant(m, sparsity, diag_val) result(arr)

end function generate_diagonal_dominant

!> return the diagonal of a matrix
function diagonal(matrix)
!> return the diagonal of a matrix
!> \param matrix: input matrix
real(dp), dimension(:, :), intent(in) :: matrix
real(dp), dimension(size(matrix, 1)) :: diagonal

Expand All @@ -156,9 +163,8 @@ function diagonal(matrix)

end function diagonal

!> Brief generates a diagonal preconditioner for .
function initialize_subspace(diag, dim_sub, dim_base) result(precond)
!> Brief generates a diagonal preconditioner for .
!>
!> return diagonal matrix

! input variable
Expand All @@ -183,10 +189,9 @@ function initialize_subspace(diag, dim_sub, dim_base) result(precond)

end function initialize_subspace

!> Brief use modifed gram-schmidt orthogonalization on mat
!> Brief nstart is the index of the first vector to orthogonalize
subroutine modified_gram_schmidt(mat, nstart)
!> Brief use modifed gram-schmidt orthogonalization on mat
!> Brief nstart is the index of the first vector to orthogonalize

! input
real(dp), dimension(:, :), intent(inout) :: mat
integer, optional, intent(in) :: nstart
Expand Down Expand Up @@ -217,8 +222,8 @@ subroutine modified_gram_schmidt(mat, nstart)

end subroutine modified_gram_schmidt

!> Brief Search for a given index in a vector
function search_key(keys, i) result(k)
!> Brief Search for a given index in a vector
!> \param keys Vector of index
!> \param i Index to search for
!>
Expand All @@ -238,8 +243,8 @@ function search_key(keys, i) result(k)

end function search_key

!> Write matrix to path_file
subroutine write_matrix(path_file, mtx)
!> Write matrix to path_file
character(len=*), intent(in) :: path_file
real(dp), dimension(:, :), intent(in) :: mtx
integer :: i, j
Expand All @@ -254,8 +259,8 @@ subroutine write_matrix(path_file, mtx)

end subroutine write_matrix

!> Write vector to path_file
subroutine write_vector(path_file, vector)
!> Write vector to path_file
character(len=*), intent(in) :: path_file
real(dp), dimension(:), intent(in) :: vector
integer :: i
Expand All @@ -268,9 +273,9 @@ subroutine write_vector(path_file, vector)

end subroutine write_vector

!> deallocate a matrix if allocated
subroutine check_deallocate_matrix(mtx)

!> deallocate a matrix if allocated
real(dp), dimension(:, :), allocatable, intent(inout) :: mtx

if (allocated(mtx)) then
Expand All @@ -279,9 +284,10 @@ subroutine check_deallocate_matrix(mtx)

end subroutine check_deallocate_matrix

!> deallocate a vector if allocated
subroutine check_deallocate_vector(vec)

!> deallocate a matrix if allocated

real(dp), dimension(:), allocatable, intent(inout) :: vec

if (allocated(vec)) then
Expand All @@ -290,9 +296,9 @@ subroutine check_deallocate_vector(vec)

end subroutine check_deallocate_vector

!> Returns the unique elements of a vector
!> Also returns the number of unique elements, their indices in the original vector.
subroutine unique_elements(n, arr, res, count, frequency, ind)
!> Returns the unique elements of a vector
!> Also returns the number of unique elements, their indices in the original vector.
!> \param[in] n: size of the vector
!> \param[in] arr: vector to be processed
!> \param[out] res: vector of unique elements
Expand Down Expand Up @@ -343,10 +349,9 @@ subroutine unique_elements(n, arr, res, count, frequency, ind)

end subroutine unique_elements


!> Returns the unique elements of a vector
!> Also returns the number of unique elements, their indices in the original vector.
subroutine unique_string_elements(n, arr, res, count)
!> Returns the unique elements of a vector
!> Also returns the number of unique elements, their indices in the original vector.
!> \param[in] n: size of the vector
!> \param[in] arr: vector to be processed
!> \param[out] res: vector of unique elements
Expand Down Expand Up @@ -399,8 +404,15 @@ subroutine unique_string_elements(n, arr, res, count)
end subroutine unique_string_elements



!> find "indices", the list of unique numbers in "list"
!> and return the sorted unique numbers in "sorted"
subroutine sortedunique(list, n, indices, sorted)
!> \param[in] list: input list
!> \param[in] n: size of the list
!> \param[out] indices: indices of the unique elements
!> \param[out] sorted: sorted unique elements
!> @author: Ravindra Shinde
!> @date: 24/05/2022
implicit none
! find "indices", the list of unique numbers in "list"

Expand Down
4 changes: 4 additions & 0 deletions src/vmc/slm.f90
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
!> Compute the zero-th, first, second, and third derivatives of a Ylm function
!> @author Claudia Filippi
!> @author Ravindra Shinde
!> @date 2022-02-11
module slm_mod
contains
subroutine slm(l,rvec,r2,y,dy,ddy,ddy_lap,dlapy,ider)
Expand Down

0 comments on commit c7e11ba

Please sign in to comment.