Merge branch 'drop-1d-tensor-support' into 'development'

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

See merge request damask/DAMASK!415
This commit is contained in:
Sharan Roongta 2021-07-21 11:25:35 +00:00
commit 9f2c377612
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,3
do i = 1,9 row => tensor%get(i)
mask((i-1)/3+1,mod(i-1,3)+1) = tensor%get_asString(i) /= 'x' do j = 1,3
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) mask(i,j) = row%get_asString(j) /= 'x'
if (mask(i,j)) values(i,j) = row%get_asFloat(j)
enddo enddo
else enddo
do i = 1,3
row => tensor%get(i)
do j = 1,3
mask(i,j) = row%get_asString(j) /= 'x' ! ToDo change to np.masked behavior
if (mask(i,j)) values(i,j) = row%get_asFloat(j)
enddo
enddo
endif
end subroutine end subroutine