| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(krn_t), | intent(inout), | target | :: | me | ||
| logical, | intent(in) | :: | for_explicit |
if true add to explicit arrays otherwise to implicit |
||
| integer, | intent(in) | :: | col(:) |
relative indexes of the variables placed into global matrix |
||
| integer, | intent(in) | :: | row(:) |
relative indexes of the variables placed into global matrix |
||
| type(dbl_pointer_t), | intent(in) | :: | val(:) |
pointer to the value which should be placed into global matrix |
subroutine krn_coo_add(me,for_explicit,col,row,val) class(krn_t), target, intent(inout) :: me logical, intent(in) :: for_explicit !! if true add to explicit arrays otherwise to implicit integer, intent(in) :: col(:), row(:) !! relative indexes of the variables placed into global matrix type(dbl_pointer_t), intent(in) :: val(:) !! pointer to the value which should be placed into global matrix integer :: loc !! starting location for the first state variable type(coo_csr_t(:)), pointer :: arr loc = sum(me%nb_state_vars(1:me%idx))-me%nb_state_vars(me%idx) arr => me%imp if(for_explicit) arr => me%exp arr%coo_col(arr%idx:arr%idx+size(col)-1) = col + loc arr%coo_row(arr%idx:arr%idx+size(col)-1) = row + loc arr%coo_ptr(arr%idx:arr%idx+size(col)-1) = val arr%idx = arr%idx + size(val) end subroutine krn_coo_add