L, P, F, etc. are second order tensors

This commit is contained in:
Martin Diehl 2021-07-21 06:19:04 +02:00
parent 575c84ad86
commit 6f19113072
2 changed files with 7 additions and 14 deletions

@ -1 +1 @@
Subproject commit a949f5417762bddc551bf99f19a26ea2bdb4e5b4 Subproject commit 174ecac2d3ab7596bdb60184d6bb9e1a52cb7378

View File

@ -482,20 +482,13 @@ subroutine getMaskedTensor(values,mask,tensor)
values = 0.0 values = 0.0
if (tensor%length == 9) then ! temporary support for deprecated 1D tensor
do i = 1,9
mask((i-1)/3+1,mod(i-1,3)+1) = tensor%get_asString(i) /= 'x'
if (mask((i-1)/3+1,mod(i-1,3)+1)) values((i-1)/3+1,mod(i-1,3)+1) = tensor%get_asFloat(i)
enddo
else
do i = 1,3 do i = 1,3
row => tensor%get(i) row => tensor%get(i)
do j = 1,3 do j = 1,3
mask(i,j) = row%get_asString(j) /= 'x' ! ToDo change to np.masked behavior mask(i,j) = row%get_asString(j) /= 'x'
if (mask(i,j)) values(i,j) = row%get_asFloat(j) if (mask(i,j)) values(i,j) = row%get_asFloat(j)
enddo enddo
enddo enddo
endif
end subroutine end subroutine