Loading...
Searching...
No Matches
Data Types | Functions/Subroutines
dc_units Module Reference

Data Types

interface  clear
 
interface  deallocate
 
interface  operator(*)
 
interface  operator(+)
 
interface  operator(/)
 
type  units
 

Functions/Subroutines

logical function, public add_okay (u1, u2)
 

Function/Subroutine Documentation

◆ add_okay()

logical function, public dc_units::add_okay ( type(units), intent(in)  u1,
type(units), intent(in)  u2 
)

Definition at line 174 of file dc_units.f90.

175 type(UNITS), intent(in):: u1, u2
176 type(UNITS):: x
177 character(STRING):: debug
178 call clear(x)
179 x = u1 / u2
180 debug = u1
181 debug = u2
182 debug = x
183 if (x%nelems == 0) then
184 result = .true.
185 else if (all(abs(x%power(1:x%nelems)) < tiny(0.0_dp))) then
186 result = .true.
187 else
188 result = .false.
189 endif
190 call deallocate(x)