Skip to content
Snippets Groups Projects
Commit 71dff04f authored by Dave Whipp's avatar Dave Whipp
Browse files

Added new code for resolving ties using past element number and renamed subroutine

parent 884c0103
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
subroutine get_elem_mat_number_from_cloud(params,ileaves,leaf_mat_bin,matel)
subroutine get_elem_mat_number_from_cloud(params,ileaves,leaf_mat_bin,ematnump,matel)
use definitions
......@@ -35,7 +35,7 @@ implicit none
!include 'mpif.h'
type (parameters) params
integer :: leaf_mat_bin(0:params%nmat),matel,ileaves
integer :: leaf_mat_bin(0:params%nmat),matel,ileaves,ematnump
!------------------------------------------------------------------------------|
!(((((((((((((((( declaration of the subroutine internal variables )))))))))))))
......@@ -69,6 +69,18 @@ enddo
! write (*,*) ''
! endif
! WE SHOULD HANDLE THE CASE WHERE AN ELEMENT HAS A TIE AND PREVIOUSLY WAS USING DIVFEM
! IF SO, ASSIGN FIRST MATERIAL IN TIE????
if (mat_max_tie) then
! Currently, we don't have a good record between iterations/time steps of the
! elemental material numbers. Ideally, in cases where an element existed in
......@@ -84,7 +96,7 @@ if (mat_max_tie) then
!write (*,'(a)') 'particles. DOUAR will continue, but the material number for this element will be'
!write (*,'(a)') 'will be that of the first maximum. In the future, this conflict should be resolved.'
!write (*,'(a)') ''
write (*,'(a,i7,a)') 'WARNING: Element ',ileaves,' has multiple max cloud materials. Assigning first max.'
!write (*,'(a,i7,a)') 'WARNING: Element ',ileaves,' has multiple max cloud materials. Assigning first max.'
!endif
! if (ileaves == 1673) then
! write (*,*) 'element: ',ileaves
......@@ -93,7 +105,12 @@ if (mat_max_tie) then
! write (*,*) 'leaf_mat_bin: ',leaf_mat_bin
! !write (*,*) ''
! endif
matel = mat_maxi
if (ematnump < 1 .or. ematnump > params%nmat) then
write (*,'(a,i7,a)') 'WARNING: Element ',ileaves,' has multiple max cloud materials. Assigning first max.'
matel = mat_maxi
else
matel = ematnump
endif
else
matel = mat_maxi
endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment