Create alpha coefficients.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(alpha_coefficients_m), | intent(inout) | :: | self | Alpha coefficients. |
||
class(base_object_constructor), | intent(in) | :: | constructor | Alpha coefficients constructor. |
pure subroutine create(self, constructor)
!< Create alpha coefficients.
class(alpha_coefficients_m), intent(inout) :: self !< Alpha coefficients.
class(base_object_constructor), intent(in) :: constructor !< Alpha coefficients constructor.
call self%destroy
call self%alpha_coefficients%create(constructor=constructor)
select type(constructor)
type is(alpha_coefficients_m_constructor)
if (allocated(constructor%base_type)) then
select case(constructor%base_type)
case('JS')
if (allocated(self%alpha_base)) deallocate(self%alpha_base)
allocate(alpha_coefficients_js :: self%alpha_base)
call self%alpha_base%create(constructor=constructor)
case('Z')
if (allocated(self%alpha_base)) deallocate(self%alpha_base)
allocate(alpha_coefficients_z :: self%alpha_base)
call self%alpha_base%create(constructor=constructor)
endselect
endif
class default
! @TODO add error handling
endselect
endsubroutine create