Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libiconmath
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
icon-libraries
libiconmath
Commits
aa678645
Commit
aa678645
authored
3 months ago
by
Pradipta Samanta
Browse files
Options
Downloads
Patches
Plain Diff
added an additional test for tdma_solver_vec
parent
28081276
No related branches found
Branches containing commit
No related tags found
1 merge request
!37
Draft: C++ port of horizontal/mo_lib_gradients.F90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/fortran/test_math_utilities.f90
+24
-7
24 additions, 7 deletions
test/fortran/test_math_utilities.f90
with
24 additions
and
7 deletions
test/fortran/test_math_utilities.f90
+
24
−
7
View file @
aa678645
...
...
@@ -253,13 +253,15 @@ CONTAINS
DO
i
=
1
,
n
DO
j
=
1
,
n
a
(
i
,
j
)
=
1.0_wp
b
(
i
,
j
)
=
2.0_wp
c
(
i
,
j
)
=
1.0_wp
d
(
i
,
j
)
=
1.0_wp
a
(
i
,
j
)
=
1.0_wp
*
(
i
+
j
)
b
(
i
,
j
)
=
2.0_wp
*
(
i
+
j
)
c
(
i
,
j
)
=
1.0_wp
*
(
i
+
j
)
d
(
i
,
j
)
=
1.0_wp
*
(
i
+
j
)
END
DO
END
DO
tol
=
1d-15
CALL
CPU_TIME
(
start_time
)
#ifndef __USE_CPP_BINDINGS
CALL
tdma_solver_vec
(
a
,
b
,
c
,
d
,
1
,
n
,
1
,
n
,
x
)
...
...
@@ -278,12 +280,27 @@ CONTAINS
DO
i
=
1
,
n
DO
j
=
1
,
n
sum
=
sum
+
x
(
i
,
j
)
! write(*,"(a,f24.16)") ' x(i, 1): ', x(i, 1)
END
DO
END
DO
sum_ref
=
27.2727272727272769_wp
tol
=
1d-15
CALL
TAG_TEST
(
"TEST_tdma_solver_vec"
)
CALL
TAG_TEST
(
"TEST_tdma_solver_vec_full"
)
CALL
ASSERT_ALMOST_EQUAL
(
sum
,
sum_ref
,
tol
)
x
=
0.0_wp
#ifndef __USE_CPP_BINDINGS
CALL
tdma_solver_vec
(
a
,
b
,
c
,
d
,
2
,
n
-1
,
2
,
n
-1
,
x
)
#else
CALL
tdma_solver_vec
(
a
,
b
,
c
,
d
,
1
,
n
-1
,
1
,
n
-1
,
n
,
n
,
x
,
-1
)
#endif
sum
=
0.0_wp
DO
i
=
2
,
n
-1
DO
j
=
2
,
n
-1
sum
=
sum
+
x
(
i
,
j
)
END
DO
END
DO
sum_ref
=
17.7777777777777679_wp
CALL
TAG_TEST
(
"TEST_tdma_solver_vec_partial"
)
CALL
ASSERT_ALMOST_EQUAL
(
sum
,
sum_ref
,
tol
)
END
SUBROUTINE
TEST_tdma_solver_vec
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment