Return a pretty-formatted object description.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eos_compressible), | intent(in) | :: | self | Equation of state. |
||
| character(len=*), | intent(in), | optional | :: | prefix | Prefixing string. |
Description.
pure function description(self, prefix) result(desc)
!< Return a pretty-formatted object description.
class(eos_compressible), intent(in) :: self !< Equation of state.
character(*), intent(in), optional :: prefix !< Prefixing string.
character(len=:), allocatable :: desc !< Description.
character(len=:), allocatable :: prefix_ !< Prefixing string, local variable.
character(len=1), parameter :: NL=new_line('a') !< New line character.
prefix_ = '' ; if (present(prefix)) prefix_ = prefix
desc = ''
desc = desc//prefix_//'cp = '//trim(str(n=self%cp_))//NL
desc = desc//prefix_//'cv = '//trim(str(n=self%cv_))
endfunction description