Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DOUAR WSMP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HUGG
DOUAR WSMP
Commits
6fc9a1c3
Commit
6fc9a1c3
authored
15 years ago
by
Douglas Guptill
Browse files
Options
Downloads
Patches
Plain Diff
same as octreesolve_shrink_xyz, for different type
parent
3b44929e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
octreelsf_shrink_xyz.f90
+91
-0
91 additions, 0 deletions
octreelsf_shrink_xyz.f90
octreev_shrink_xyz.f90
+91
-0
91 additions, 0 deletions
octreev_shrink_xyz.f90
with
182 additions
and
0 deletions
octreelsf_shrink_xyz.f90
0 → 100644
+
91
−
0
View file @
6fc9a1c3
subroutine
octreelsf_shrink_xyz
(
os
,
threadinfo
)
! resize the x,y,z arrays.
! Author: Douglas Guptill
! Copyright (c) 2009 Douglas Guptill. All rights reserved.
! 2009-07-27: new, from a copy of octreesolve_shring_xyz,
! and identical to it,
! except for the type of the first parameter.
! I wish I knew a better way.!
use
threads
use
definitions
implicit
none
! parameters, in
type
(
thread
)
threadinfo
! parameters, in/out
type
(
octreelsf
)
os
! local variables
integer
i
,
new_size
double precision
,
dimension
(:),
pointer
::
t
new_size
=
os
%
nnode
! make a temporary array
allocate
(
t
(
new_size
),
stat
=
threadinfo
%
err
)
call
heap
(
threadinfo
,
't'
,
'octreelsf_shrink_xyz...'
,
size
(
t
),
'dp'
,
+1
)
! shrink x...............................................
! transfer the x data to it
do
i
=
1
,
new_size
t
(
i
)
=
os
%
x
(
i
)
enddo
! delete and re-create the x array
call
heap
(
threadinfo
,
'os%x'
,
'octreelsf_shrink_xyz...'
,
size
(
os
%
x
),
'dp'
,
-1
)
deallocate
(
os
%
x
)
allocate
(
os
%
x
(
new_size
),
stat
=
threadinfo
%
err
)
call
heap
(
threadinfo
,
'os%x'
,
'octreelsf_shrink_xyz...'
,
size
(
os
%
x
),
'dp'
,
+1
)
! transfer the data from the temporary array to the new x aray
do
i
=
1
,
new_size
os
%
x
(
i
)
=
t
(
i
)
enddo
! shrink y...............................................
! transfer the y data to it
do
i
=
1
,
new_size
t
(
i
)
=
os
%
y
(
i
)
enddo
! delete and re-create the y array
call
heap
(
threadinfo
,
'os%y'
,
'octreelsf_shrink_xyz...'
,
size
(
os
%
y
),
'dp'
,
-1
)
deallocate
(
os
%
y
)
allocate
(
os
%
y
(
new_size
),
stat
=
threadinfo
%
err
)
call
heap
(
threadinfo
,
'os%y'
,
'octreelsf_shrink_xyz...'
,
size
(
os
%
y
),
'dp'
,
+1
)
! transfer the data from the temporary array to the new y aray
do
i
=
1
,
new_size
os
%
y
(
i
)
=
t
(
i
)
enddo
! shrink z...............................................
! transfer the z data to it
do
i
=
1
,
new_size
t
(
i
)
=
os
%
z
(
i
)
enddo
! delete and re-create the z array
call
heap
(
threadinfo
,
'os%z'
,
'octreelsf_shrink_xyz...'
,
size
(
os
%
z
),
'dp'
,
-1
)
deallocate
(
os
%
z
)
allocate
(
os
%
z
(
new_size
),
stat
=
threadinfo
%
err
)
call
heap
(
threadinfo
,
'os%z'
,
'octreelsf_shrink_xyz...'
,
size
(
os
%
z
),
'dp'
,
+1
)
! transfer the data from the temporary array to the new z aray
do
i
=
1
,
new_size
os
%
z
(
i
)
=
t
(
i
)
enddo
! delete the temporary array
call
heap
(
threadinfo
,
't'
,
'octreelsf_shrink_xyz...'
,
size
(
t
),
'dp'
,
-1
)
deallocate
(
t
)
return
end
This diff is collapsed.
Click to expand it.
octreev_shrink_xyz.f90
0 → 100644
+
91
−
0
View file @
6fc9a1c3
subroutine
octreev_shrink_xyz
(
os
,
threadinfo
)
! resize the x,y,z arrays.
! Author: Douglas Guptill
! Copyright (c) 2009 Douglas Guptill. All rights reserved.
! 2009-07-27: new, from a copy of octreesolve_shring_xyz,
! and identical to it,
! except for the type of the first parameter.
! I wish I knew a better way.!
use
threads
use
definitions
implicit
none
! parameters, in
type
(
thread
)
threadinfo
! parameters, in/out
type
(
octreev
)
os
! local variables
integer
i
,
new_size
double precision
,
dimension
(:),
pointer
::
t
new_size
=
os
%
nnode
! make a temporary array
allocate
(
t
(
new_size
),
stat
=
threadinfo
%
err
)
call
heap
(
threadinfo
,
't'
,
'octreev_shrink_xyz...'
,
size
(
t
),
'dp'
,
+1
)
! shrink x...............................................
! transfer the x data to it
do
i
=
1
,
new_size
t
(
i
)
=
os
%
x
(
i
)
enddo
! delete and re-create the x array
call
heap
(
threadinfo
,
'os%x'
,
'octreev_shrink_xyz...'
,
size
(
os
%
x
),
'dp'
,
-1
)
deallocate
(
os
%
x
)
allocate
(
os
%
x
(
new_size
),
stat
=
threadinfo
%
err
)
call
heap
(
threadinfo
,
'os%x'
,
'octreev_shrink_xyz...'
,
size
(
os
%
x
),
'dp'
,
+1
)
! transfer the data from the temporary array to the new x aray
do
i
=
1
,
new_size
os
%
x
(
i
)
=
t
(
i
)
enddo
! shrink y...............................................
! transfer the y data to it
do
i
=
1
,
new_size
t
(
i
)
=
os
%
y
(
i
)
enddo
! delete and re-create the y array
call
heap
(
threadinfo
,
'os%y'
,
'octreev_shrink_xyz...'
,
size
(
os
%
y
),
'dp'
,
-1
)
deallocate
(
os
%
y
)
allocate
(
os
%
y
(
new_size
),
stat
=
threadinfo
%
err
)
call
heap
(
threadinfo
,
'os%y'
,
'octreev_shrink_xyz...'
,
size
(
os
%
y
),
'dp'
,
+1
)
! transfer the data from the temporary array to the new y aray
do
i
=
1
,
new_size
os
%
y
(
i
)
=
t
(
i
)
enddo
! shrink z...............................................
! transfer the z data to it
do
i
=
1
,
new_size
t
(
i
)
=
os
%
z
(
i
)
enddo
! delete and re-create the z array
call
heap
(
threadinfo
,
'os%z'
,
'octreev_shrink_xyz...'
,
size
(
os
%
z
),
'dp'
,
-1
)
deallocate
(
os
%
z
)
allocate
(
os
%
z
(
new_size
),
stat
=
threadinfo
%
err
)
call
heap
(
threadinfo
,
'os%z'
,
'octreev_shrink_xyz...'
,
size
(
os
%
z
),
'dp'
,
+1
)
! transfer the data from the temporary array to the new z aray
do
i
=
1
,
new_size
os
%
z
(
i
)
=
t
(
i
)
enddo
! delete the temporary array
call
heap
(
threadinfo
,
't'
,
'octreev_shrink_xyz...'
,
size
(
t
),
'dp'
,
-1
)
deallocate
(
t
)
return
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment