Loading...
Searching...
No Matches
dc_units::operator(*) Interface Reference

Public Member Functions

type(units) function dcunitsmul (u1, u2)

Detailed Description

Definition at line 48 of file dc_units.f90.

Member Function/Subroutine Documentation

◆ dcunitsmul()

type(units) function dc_units::operator(*)::dcunitsmul ( type(units), intent(in) u1,
type(units), intent(in) u2 )

Definition at line 97 of file dc_units.f90.

98 type(UNITS), intent(in):: u1, u2
99 integer:: n
100 character(TOKEN), allocatable:: name(:)
101 real(DP), allocatable:: power(:)
102 result%factor = u1%factor * u2%factor
103 result%nelems = u1%nelems + u2%nelems
104 result%offset = ""
105 n = result%nelems
106 if (n == 0) then
107 nullify(result%name, result%power)
108 return
109 endif
110 allocate(name(n), power(n))
111 name = (/u1%name, u2%name/)
112 power = (/u1%power, u2%power/)
113 call units_simplify(result, name, power)
114 deallocate(name, power)

The documentation for this interface was generated from the following file: