RMPCDMD
test
test_common_1.f90
Go to the documentation of this file.
1
! This file is part of RMPCDMD
2
! Copyright (c) 2016 Pierre de Buyl and contributors
3
! License: BSD 3-clause (see file LICENSE)
4
5
program
test_common_1
6
use
common
7
use
tester
8
implicit none
9
10
type
(tester_t) :: test
11
12
double precision
,
dimension(3)
:: x1, x2, x3
13
14
call
test% init()
15
16
x1 = [1, 0, 0]
17
x2 = [0, 1, 0]
18
x3 =
cross
(x1, x2)
19
20
call
test% assert_close(x3, [0.d0, 0.d0, 1.d0])
21
22
x1 = [1, 2, 3]
23
x2 = [4, 5, 6]
24
x3 =
cross
(x1, x2)
25
26
call
test% assert_close(x3, [-3.d0, 6.d0, -3.d0])
27
28
call
test% print()
29
30
end program
test_common_1
test_common_1
program test_common_1
Definition:
test_common_1.f90:5
common::cross
pure double precision function, dimension(3), public cross(x1, x2)
Definition:
common.f90:405
common
Utility routines.
Definition:
common.f90:12
Generated by
1.8.13