solve Subroutine

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


Variables

TypeVisibility AttributesNameInitial
integer(kind=4), public :: i
integer(kind=4), public :: j
real(kind=8), public :: sum1
real(kind=8), public :: sum2
real(kind=8), public :: oldx
real(kind=8), public :: epsilon