Builds a Chebyshsev pseudospectral differentiation matrix block which can be used to solve the inverse problem. The result can only be used with fields having the same grid as the template.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_field), | intent(in) | :: | template | A scalar field with the same grid as any fields passed as arguments to the solve_for method. |
function constructor(template) result(this)
!* Author: Chris MacMackin
! Date: September 2017
!
! Builds a Chebyshsev pseudospectral differentiation matrix block
! which can be used to solve the inverse problem. The result can
! only be used with fields having the same grid as the template.
!
class(abstract_field), intent(in) :: template
!! A scalar field with the same grid as any fields passed as
!! arguments to the [[pseudospec_block(type):solve_for]] method.
type(pseudospec_block) :: this
real(r8), dimension(:,:), allocatable :: domain
domain = template%domain()
this%xvals => collocation_points(template%elements()-1, domain(1,1), &
domain(1,2))
end function constructor