Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(pf_amisdcQ_t), | intent(inout) | :: | this | |||
class(pf_level_t), | intent(inout) | :: | lev |
subroutine amisdcQ_initialize(this, lev)
class(pf_amisdcQ_t), intent(inout) :: this
class(pf_level_t), intent(inout) :: lev
real(pfdp) :: dsdc(lev%nnodes-1)
integer :: m, n, nnodes
this%npieces = 3
nnodes = lev%nnodes
allocate(this%QdiffE(nnodes-1,nnodes)) ! S-FE
allocate(this%QdiffI(nnodes-1,nnodes)) ! S-BE
allocate(this%QtilE(nnodes-1,nnodes)) ! S-FE
allocate(this%QtilI(nnodes-1,nnodes)) ! S-BE
this%QtilE = 0.0_pfdp
this%QtilI = 0.0_pfdp
dsdc = lev%nodes(2:nnodes) - lev%nodes(1:nnodes-1)
! Implicit matrix
if (this%use_LUq_) then
! Get the LU
call myLUq(lev%qmat,lev%LUmat,lev%nnodes,1)
this%QtilI = lev%LUmat
else
do m = 1, nnodes-1
do n = 1,m
this%QtilI(m,n+1) = dsdc(n)
end do
end do
end if
! Explicit matrix
do m = 1, nnodes-1
do n = 1,m
this%QtilE(m,n) = dsdc(n)
end do
end do
this%QdiffE = lev%qmat-this%QtilE
this%QdiffI = lev%qmat-this%QtilI
end subroutine amisdcQ_initialize