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

resize xyz after nnode changed by finding connectivity, delay other allocates...

resize xyz after nnode changed by finding connectivity, delay other allocates that depend on nnode til same place
parent 6fc9a1c3
No related branches found
No related tags found
No related merge requests found
......@@ -80,20 +80,24 @@ if (params%irestart.eq.0) then
allocate (ov%y(ov%nnode),stat=threadinfo%err) ; call heap (threadinfo,'ov%y','define_ov',size(ov%y),'dp',+1)
allocate (ov%z(ov%nnode),stat=threadinfo%err) ; call heap (threadinfo,'ov%z','define_ov',size(ov%z),'dp',+1)
allocate (ov%icon(8,ov%nleaves),stat=threadinfo%err) ; call heap (threadinfo,'ov%icon','define_ov',size(ov%icon),'int',+1)
allocate (ov%unode(ov%nnode),stat=threadinfo%err) ; call heap (threadinfo,'ov%unode','define_ov',size(ov%unode),'dp',+1)
allocate (ov%vnode(ov%nnode),stat=threadinfo%err) ; call heap (threadinfo,'ov%vnode','define_ov',size(ov%vnode),'dp',+1)
allocate (ov%wnode(ov%nnode),stat=threadinfo%err) ; call heap (threadinfo,'ov%wnode','define_ov',size(ov%wnode),'dp',+1)
allocate (ov%temp(ov%nnode),stat=threadinfo%err) ; call heap (threadinfo,'ov%temp','define_ov',size(ov%temp),'dp',+1)
allocate (ov%temporary_nodal_pressure(ov%nnode),stat=threadinfo%err)
call heap (threadinfo,'ov%temporary_nodal_pressure','define_ov',size(ov%temporary_nodal_pressure),'dp',+1)
allocate (ov%whole_leaf_in_fluid(ov%nleaves),stat=threadinfo%err)
call heap (threadinfo,'ov%whole_leaf_in_fluid','define_ov',size(ov%whole_leaf_in_fluid),'bool',+1)
ov%whole_leaf_in_fluid=.false.
! builds the nodal connectivity
call octree_find_node_connectivity (ov%octree,ov%noctree,ov%icon, &
ov%nleaves,ov%x,ov%y,ov%z,ov%nnode)
! ov%nnode has been changed by octree_find_node_connectivity, so re-size x, y, z
call octreev_shrink_xyz(osolve, threadinfo)
! now that ov%nnode is known we can allocate the others
allocate (ov%unode(ov%nnode),stat=threadinfo%err) ; call heap (threadinfo,'ov%unode','define_ov',size(ov%unode),'dp',+1)
allocate (ov%vnode(ov%nnode),stat=threadinfo%err) ; call heap (threadinfo,'ov%vnode','define_ov',size(ov%vnode),'dp',+1)
allocate (ov%wnode(ov%nnode),stat=threadinfo%err) ; call heap (threadinfo,'ov%wnode','define_ov',size(ov%wnode),'dp',+1)
allocate (ov%temp(ov%nnode),stat=threadinfo%err) ; call heap (threadinfo,'ov%temp','define_ov',size(ov%temp),'dp',+1)
allocate (ov%temporary_nodal_pressure(ov%nnode),stat=threadinfo%err)
call heap (threadinfo,'ov%temporary_nodal_pressure','define_ov',size(ov%temporary_nodal_pressure),'dp',+1)
! initializes temp and velo
ov%unode=0.d0
ov%vnode=0.d0
......
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