Skip to content
Snippets Groups Projects
Commit d68fec5f authored by Douglas Guptill's avatar Douglas Guptill
Browse files

split long lines, print lsf size if different

parent 2df59283
No related branches found
No related tags found
No related merge requests found
!------------------------------------------------------------------------------| !------------------------------------------------------------------------------|
!------------------------------------------------------------------------------| !------------------------------------------------------------------------------|
! | ! |
! ||===\\ | ! ||===\\ |
! || \\ | ! || \\ |
! || || //==\\ || || //==|| ||/==\\ | ! || || //==\\ || || //==|| ||/==\\ |
! || || || || || || || || || || | ! || || || || || || || || || || |
...@@ -72,7 +72,8 @@ if(iproc.eq.0) write(8,*) 'embedding surface',is,'/',params%ns ...@@ -72,7 +72,8 @@ if(iproc.eq.0) write(8,*) 'embedding surface',is,'/',params%ns
! we first create a uniform octree at level leveluniform_oct ! we first create a uniform octree at level leveluniform_oct
olsf%noctree=params%noctreemax olsf%noctree=params%noctreemax
allocate (olsf%octree(olsf%noctree),stat=threadinfo%err) ; call heap (threadinfo,'olsf%octree', 'embed_surf...',size(olsf%octree),'int',+1) allocate (olsf%octree(olsf%noctree),stat=threadinfo%err)
call heap (threadinfo,'olsf%octree', 'embed_surf...',size(olsf%octree),'int',+1)
call octree_init (olsf%octree,olsf%noctree) call octree_init (olsf%octree,olsf%noctree)
call octree_create_uniform (olsf%octree,olsf%noctree,params%leveluniform_oct) call octree_create_uniform (olsf%octree,olsf%noctree,params%leveluniform_oct)
...@@ -86,17 +87,22 @@ if (iproc.eq.0) write (8,*) olsf%nleaves,' leaves in lsf octree' ...@@ -86,17 +87,22 @@ if (iproc.eq.0) write (8,*) olsf%nleaves,' leaves in lsf octree'
! we then calculate the connectivity and node coordinates of the surface octree ! we then calculate the connectivity and node coordinates of the surface octree
olsf%nnode=olsf%nleaves*3 olsf%nnode=olsf%nleaves*3
allocate (olsf%icon(8,olsf%nleaves),stat=threadinfo%err) ; call heap (threadinfo,'olsf%icon','embed_surf...',size(olsf%icon),'int',+1) allocate (olsf%icon(8,olsf%nleaves),stat=threadinfo%err)
allocate (olsf%x(olsf%nnode),stat=threadinfo%err) ; call heap (threadinfo,'olsf%x','embed_surf...',size(olsf%x),'dp',+1) call heap (threadinfo,'olsf%icon','embed_surf...',size(olsf%icon),'int',+1)
allocate (olsf%y(olsf%nnode),stat=threadinfo%err) ; call heap (threadinfo,'olsf%y','embed_surf...',size(olsf%y),'dp',+1) allocate (olsf%x(olsf%nnode),stat=threadinfo%err)
allocate (olsf%z(olsf%nnode),stat=threadinfo%err) ; call heap (threadinfo,'olsf%z','embed_surf...',size(olsf%z),'dp',+1) call heap (threadinfo,'olsf%x','embed_surf...',size(olsf%x),'dp',+1)
allocate (olsf%y(olsf%nnode),stat=threadinfo%err)
call heap (threadinfo,'olsf%y','embed_surf...',size(olsf%y),'dp',+1)
allocate (olsf%z(olsf%nnode),stat=threadinfo%err)
call heap (threadinfo,'olsf%z','embed_surf...',size(olsf%z),'dp',+1)
call octree_find_node_connectivity (olsf%octree,olsf%noctree,olsf%icon,olsf%nleaves,olsf%x,olsf%y,olsf%z,olsf%nnode) call octree_find_node_connectivity (olsf%octree,olsf%noctree,olsf%icon,olsf%nleaves,olsf%x,olsf%y,olsf%z,olsf%nnode)
write(threadinfo%Logunit,*) '[same] embed_surface_in_octree: olsf%nnode ',olsf%nnode write(threadinfo%Logunit,*) '[same] embed_surface_in_octree: olsf%nnode ',olsf%nnode
call flush(threadinfo%Logunit) call flush(threadinfo%Logunit)
allocate (olsf%lsf(olsf%nnode),stat=threadinfo%err) ; call heap (threadinfo,'olsf%lsf', 'embed_surf...',size(olsf%lsf),'dp',+1) allocate (olsf%lsf(olsf%nnode),stat=threadinfo%err)
call heap (threadinfo,'olsf%lsf', 'embed_surf...',size(olsf%lsf),'dp',+1)
! we then calculate the lsf on the olsf octree ! we then calculate the lsf on the olsf octree
...@@ -119,16 +125,20 @@ oint%noctree=osolve%noctree ...@@ -119,16 +125,20 @@ oint%noctree=osolve%noctree
oint%nleaves=osolve%nleaves oint%nleaves=osolve%nleaves
oint%nnode=osolve%nnode oint%nnode=osolve%nnode
oint%nlsf=osolve%nlsf oint%nlsf=osolve%nlsf
write(*,*) 'oint noctree,nleaves,nnode,nlsf are', oint%noctree,oint%nleaves,oint%nnode,oint%nlsf ! write(threadinfo%mem_heap_unit,*) 'oint noctree,nleaves,nnode,nlsf are', oint%noctree,oint%nleaves,oint%nnode,oint%nlsf
! Bug fixed by Jean on June 24 2009 allocate (oint%octree(params%noctreemax),stat=threadinfo%err)
!allocate (oint%octree(oint%noctree),stat=threadinfo%err) ; call heap (threadinfo,'oint%octree', 'embed_surf...',size(oint%octree),'int',+1) call heap (threadinfo,'oint%octree', 'embed_surf...',size(oint%octree),'int',+1)
allocate (oint%octree(params%noctreemax),stat=threadinfo%err) ; call heap (threadinfo,'oint%octree', 'embed_surf...',size(oint%octree),'int',+1) allocate (oint%icon(8,oint%nleaves),stat=threadinfo%err)
allocate (oint%icon(8,oint%nleaves),stat=threadinfo%err) ; call heap (threadinfo,'oint%icon', 'embed_surf...',size(oint%icon),'int',+1) call heap (threadinfo,'oint%icon', 'embed_surf...',size(oint%icon),'int',+1)
allocate (oint%lsf(oint%nnode,oint%nlsf),stat=threadinfo%err) ; call heap (threadinfo,'oint%lsf', 'embed_surf...',size(oint%lsf),'dp',+1) allocate (oint%lsf(oint%nnode,oint%nlsf),stat=threadinfo%err)
allocate (oint%x(oint%nnode),stat=threadinfo%err) ; call heap (threadinfo,'oint%x', 'embed_surf...',size(oint%x),'dp',+1) call heap (threadinfo,'oint%lsf', 'embed_surf...',size(oint%lsf),'dp',+1)
allocate (oint%y(oint%nnode),stat=threadinfo%err) ; call heap (threadinfo,'oint%y', 'embed_surf...',size(oint%y),'dp',+1) allocate (oint%x(oint%nnode),stat=threadinfo%err)
allocate (oint%z(oint%nnode),stat=threadinfo%err) ; call heap (threadinfo,'oint%z', 'embed_surf...',size(oint%z),'dp',+1) call heap (threadinfo,'oint%x', 'embed_surf...',size(oint%x),'dp',+1)
allocate (oint%y(oint%nnode),stat=threadinfo%err)
call heap (threadinfo,'oint%y', 'embed_surf...',size(oint%y),'dp',+1)
allocate (oint%z(oint%nnode),stat=threadinfo%err)
call heap (threadinfo,'oint%z', 'embed_surf...',size(oint%z),'dp',+1)
oint%octree=osolve%octree oint%octree=osolve%octree
oint%icon=osolve%icon oint%icon=osolve%icon
...@@ -136,13 +146,12 @@ if (size(oint%lsf).ne.size(osolve%lsf)) then ...@@ -136,13 +146,12 @@ if (size(oint%lsf).ne.size(osolve%lsf)) then
write(*,*) 'oint%lsf = osolve%lsf; sizes differ', size(oint%lsf), size(osolve%lsf) write(*,*) 'oint%lsf = osolve%lsf; sizes differ', size(oint%lsf), size(osolve%lsf)
endif endif
oint%lsf=osolve%lsf oint%lsf=osolve%lsf
oint%x=osolve%x oint%x=osolve%x
oint%y=osolve%y oint%y=osolve%y
oint%z=osolve%z oint%z=osolve%z
! having replicated osolve, we can deallocate it ! having replicated osolve, we can deallocate it
call heap (threadinfo,'osolve%icon','embed_surf...',size(osolve%icon),'int',-1) ; deallocate (osolve%icon) call heap (threadinfo,'osolve%icon','embed_surf...',size(osolve%icon),'int',-1) ; deallocate (osolve%icon)
call heap (threadinfo,'osolve%x','embed_surf...',size(osolve%x),'dp',-1) ; deallocate (osolve%x) call heap (threadinfo,'osolve%x','embed_surf...',size(osolve%x),'dp',-1) ; deallocate (osolve%x)
call heap (threadinfo,'osolve%y','embed_surf...',size(osolve%y),'dp',-1) ; deallocate (osolve%y) call heap (threadinfo,'osolve%y','embed_surf...',size(osolve%y),'dp',-1) ; deallocate (osolve%y)
call heap (threadinfo,'osolve%z','embed_surf...',size(osolve%z),'dp',-1) ; deallocate (osolve%z) call heap (threadinfo,'osolve%z','embed_surf...',size(osolve%z),'dp',-1) ; deallocate (osolve%z)
...@@ -154,7 +163,7 @@ call octree_init (osolve%octree,osolve%noctree) ...@@ -154,7 +163,7 @@ call octree_init (osolve%octree,osolve%noctree)
osolve%octree=oint%octree osolve%octree=oint%octree
! we modify the osolve%octree by embedding the olsf in it ! we modify the osolve%octree by embedding the olsf in it
allocate (levs(olsf%nleaves),stat=threadinfo%err) ; call heap (threadinfo,'levs', 'embed_surf...',size(levs),'dp',+1) allocate (levs(olsf%nleaves),stat=threadinfo%err) ; call heap (threadinfo,'levs', 'embed_surf...',size(levs),'dp',+1)
call octree_find_element_level (olsf%octree,olsf%noctree,levs,olsf%nleaves) call octree_find_element_level (olsf%octree,olsf%noctree,levs,olsf%nleaves)
do ie=1,olsf%nleaves do ie=1,olsf%nleaves
...@@ -177,10 +186,14 @@ osolve%nleaves = ioctree_number_of_elements(osolve%octree,osolve%noctree) ...@@ -177,10 +186,14 @@ osolve%nleaves = ioctree_number_of_elements(osolve%octree,osolve%noctree)
osolve%nnode = osolve%nleaves*3 osolve%nnode = osolve%nleaves*3
osolve%nlsf = params%ns osolve%nlsf = params%ns
allocate (osolve%icon(8,osolve%nleaves),stat=threadinfo%err) ; call heap (threadinfo,'osolve%icon','embed_surf...',size(osolve%icon),'int',+1) allocate (osolve%icon(8,osolve%nleaves),stat=threadinfo%err)
allocate (osolve%x(osolve%nnode),stat=threadinfo%err) ; call heap (threadinfo,'osolve%x', 'embed_surf...',size(osolve%x),'dp',+1) call heap (threadinfo,'osolve%icon','embed_surf...',size(osolve%icon),'int',+1)
allocate (osolve%y(osolve%nnode),stat=threadinfo%err) ; call heap (threadinfo,'osolve%y', 'embed_surf...',size(osolve%y),'dp',+1) allocate (osolve%x(osolve%nnode),stat=threadinfo%err)
allocate (osolve%z(osolve%nnode),stat=threadinfo%err) ; call heap (threadinfo,'osolve%z', 'embed_surf...',size(osolve%z),'dp',+1) call heap (threadinfo,'osolve%x', 'embed_surf...',size(osolve%x),'dp',+1)
allocate (osolve%y(osolve%nnode),stat=threadinfo%err)
call heap (threadinfo,'osolve%y', 'embed_surf...',size(osolve%y),'dp',+1)
allocate (osolve%z(osolve%nnode),stat=threadinfo%err)
call heap (threadinfo,'osolve%z', 'embed_surf...',size(osolve%z),'dp',+1)
! we build the icon array of osolve. the routine also outputs the real number of nodes osolve%nnode ! we build the icon array of osolve. the routine also outputs the real number of nodes osolve%nnode
...@@ -189,7 +202,8 @@ call octree_find_node_connectivity (osolve%octree,osolve%noctree, & ...@@ -189,7 +202,8 @@ call octree_find_node_connectivity (osolve%octree,osolve%noctree, &
osolve%x,osolve%y,osolve%z,osolve%nnode) osolve%x,osolve%y,osolve%z,osolve%nnode)
! now that osolve%nnode is known we can allocate osolve%lsf ! now that osolve%nnode is known we can allocate osolve%lsf
allocate (osolve%lsf(osolve%nnode,osolve%nlsf),stat=threadinfo%err) ; call heap (threadinfo,'osolve%lsf', 'embed_surf...',size(osolve%lsf),'dp',+1) allocate (osolve%lsf(osolve%nnode,osolve%nlsf),stat=threadinfo%err)
call heap (threadinfo,'osolve%lsf', 'embed_surf...',size(osolve%lsf),'dp',+1)
! if we are dealing with the last surface, nodes are renumbered ! if we are dealing with the last surface, nodes are renumbered
if (params%renumber_nodes .and. is.eq.params%ns) then if (params%renumber_nodes .and. is.eq.params%ns) then
......
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