-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Basic units module * Implements some operator overloads * Needs extension to more units
- Loading branch information
Kyle Horne
committed
Sep 28, 2016
1 parent
0ec7cc0
commit 1cb76eb
Showing
3 changed files
with
409 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
program testUnits_prg | ||
!! Test program for units_mod | ||
!! @todo | ||
!! Needs serious improvements | ||
use kinds_mod, only: wp | ||
use units_mod | ||
implicit none | ||
|
||
call testUnits | ||
|
||
contains | ||
|
||
subroutine testUnits | ||
type(quantity_t)::dP | ||
type(quantity_t)::rho | ||
type(quantity_t)::V | ||
|
||
rho = quantity_t(1.225_wp,'kg')/quantity_t(1.0_wp,'m')**3 | ||
dP = quantity_t(7.25E-2_wp,'psi') | ||
dP = dP%convert( quantity_t(1.0_wp,'Pa') ) | ||
|
||
V = sqrt(2.0_wp*dP/rho) | ||
|
||
write(*,*) V%value,V%getChar() | ||
end subroutine testUnits | ||
|
||
end program testUnits_prg | ||
|
Oops, something went wrong.