linear_algebra Module

Functions

public function interp(x, f, x_i)

Arguments

Type IntentOptional AttributesName
real(kind=8), , dimension(:):: x

the mesh on which the function points are provided

real(kind=8), , dimension(:):: f

the function points

real(kind=8) :: x_i

the point at which the function value is desired

Return Value real(kind=8)

the value at point x_i

Description

find a linearly interpolated value of a function \(f\left(x\right)\) at point \(x_{i}\) given values of the function in \(\vec{f}\) at points \(\vec{x}\)


Subroutines

public subroutine matvecmult(M, v, outv)

Arguments

Type IntentOptional AttributesName
real(kind=8), intent(in), dimension(:,:):: M

The matrix

real(kind=8), intent(in), dimension(:):: v

The vector

real(kind=8), intent(out), dimension(:), allocatable:: outv

The result

Description

multiply a matrix \(\mathbb{M}\) and a vector \(\vec{v}\) and get result \(\vec{outv}\)

public subroutine solve(A, x, b)

Arguments

Type IntentOptional AttributesName
real(kind=8), intent(in), dimension(:,:):: A

The matrix \(\mathbb{A}\) to be inverted

real(kind=8), intent(out), dimension(:):: x

The vector solution \(\vec{x}\)

real(kind=8), intent(in), dimension(:):: b

The vector \(\vec{b}\) with the boundary conditions

Description

solve the equation \(\mathbb{A}\vec{x} = \vec{b}\) for \(\vec{x}\) using Gauss-Seidel method