Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Variables
Type
Attributes
Name
Initial
real(kind=rk),
dimension(4,4)
::
A
real(kind=rk),
dimension(4)
::
b
real(kind=rk),
dimension(4)
::
x
real(kind=rk),
dimension(4)
::
expected_x
type(unit_test)
::
ut
Source Code
program test_solver16use kindsuse forsolveruse forunittestimplicit nonereal(rk),dimension(4,4)::Areal(rk),dimension(4)::breal(rk),dimension(4)::x,expected_xtype(unit_test)::ut! set the matrix AA(1,:)=[1.44_rk,-7.84_rk,-4.39_rk,4.53_rk]A(2,:)=[-9.96_rk,-0.28_rk,-3.24_rk,3.83_rk]A(3,:)=[-7.55_rk,3.24_rk,6.27_rk,-6.64_rk]A(4,:)=[8.34_rk,8.09_rk,5.28_rk,2.06_rk]! set the right-hand sideb=[8.58_rk,8.26_rk,8.48_rk,-5.28_rk]! solve the systemx=solve(A,b)! X = solve(A, b, method='gesvs')! expected resultexpected_x(1)=-1.0544691129297037_rkexpected_x(2)=-1.9149827187319857_rkexpected_x(3)=2.9192679369935912_rkexpected_x(4)=1.7440523733249165_rk! check the resultcall ut%check(x,expected_x,1.0e-5_rk,'test_solver16')end program test_solver16