gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
dc_units::operator(*) Interface Reference

Public Member Functions

type(units) function dcunitsmul (u1, u2)

Detailed Description

Definition at line 99 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 )

Multiply two UNITS

Parameters
[in]u1First UNITS variable
[in]u2Second UNITS variable
Returns
Product of two UNITS

Definition at line 179 of file dc_units.f90.

180 type(UNITS), intent(in):: u1, u2
181 integer:: n
182 character(TOKEN), allocatable:: name(:)
183 real(DP), allocatable:: power(:)
184 result%factor = u1%factor * u2%factor
185 result%nelems = u1%nelems + u2%nelems
186 result%offset = ""
187 n = result%nelems
188 if (n == 0) then
189 nullify(result%name, result%power)
190 return
191 endif
192 allocate(name(n), power(n))
193 name = (/u1%name, u2%name/)
194 power = (/u1%power, u2%power/)
195 call units_simplify(result, name, power)
196 deallocate(name, power)

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