This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module integer_list_mod | |
implicit none | |
private | |
public :: integer_list | |
type :: index_t | |
private | |
integer :: idx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!> Check Endianess | |
!> | |
!> Inspect the endianess of the platform. | |
!> | |
!> Based on a program posted by @urbanjost ([email protected]) | |
!> posted at https://github.com/fortran-lang/stdlib/issues/323. The original | |
!> program was based on ideas from the Code Tuning co-guide, 1998 Lahey Fortran | |
!> Users' Conference. | |
!> | |
!> Author: Ivan Pribec ([email protected]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! | |
! PCG Random Number Generation for Fortran | |
! Ported from the minimal C version by Melissa O'Neill | |
! | |
! Copyright 2020 Ivan Pribec <[email protected]> | |
! | |
! | |
! Copyright 2014 Melissa O'Neill <[email protected]> | |
! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! Sparse BLAS matrix-vector product example | |
! | |
! The following code demonstrates the creation of | |
! a CSR matrix, and the sparse matrix-vector product | |
! using the sparse BLAS functions in Intel MKL. | |
! | |
! For linking options for your specific platform see | |
! the Intel MKL link line advisor located at: | |
! https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl/link-line-advisor.html | |
! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module nheap_mod | |
implicit none | |
private | |
public :: nheap | |
integer, parameter :: wp = kind(1.0d0) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module quadtree | |
! Adapted from the tutorial at https://scipython.com/blog/quadtrees-2-implementation-in-python/ | |
implicit none | |
integer, parameter :: wp = kind(1.0d0) | |
type :: qtnode | |
real(wp) :: c(2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module day4 | |
use fortran202x_split, only: split | |
!! The `fortran202x_split` module can be downloaded from: | |
!! https://github.com/milancurcic/fortran202x_split | |
implicit none | |
private | |
public :: count_passports |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module polyfit_mod | |
implicit none | |
contains | |
function vander(x,N,increasing) result(v) | |
real, intent(in) :: x(:) | |
integer, intent(in) :: N | |
logical, intent(in), optional :: increasing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! Compile with: | |
! $ gfortran -Wall polynomial_companion_matrix.f90 -o polynomial_companion_matrix -llapack | |
! | |
! To run the code: | |
! $ ./polynomial_companion_matrix | |
! | |
program main | |
implicit none | |
integer, parameter :: sp = kind(1.0) | |
integer, parameter :: n = 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! For an explanation see: | |
! https://scicomp.stackexchange.com/questions/36261/factorization-of-cubic-spline-interpolation-matrix | |
! | |
! compile with: | |
! gfortran -Wall spline_test_driver.f90 -o spline_test_driver -llapack | |
! | |
module spline_test | |
implicit none |