Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Ben Boeckel
Xdmf
Commits
0382f139
Commit
0382f139
authored
Feb 22, 2013
by
Andrew J. Burns (Cont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
File splitting optimized more
parent
4084f4e6
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
294 additions
and
61 deletions
+294
-61
core/XdmfHDF5Writer.cpp
core/XdmfHDF5Writer.cpp
+259
-61
tests/Python/SplitTime.py
tests/Python/SplitTime.py
+35
-0
No files found.
core/XdmfHDF5Writer.cpp
View file @
0382f139
This diff is collapsed.
Click to expand it.
tests/Python/SplitTime.py
0 → 100644
View file @
0382f139
import
Xdmf
import
timeit
import
os
import
time
numberArrays
=
10000
arraySize
=
10000
class
TimedWrite
():
def
__init__
(
self
):
self
.
domain
=
Xdmf
.
XdmfDomain
.
New
()
grid
=
Xdmf
.
XdmfUnstructuredGrid
.
New
()
self
.
domain
.
insert
(
grid
)
for
i
in
range
(
0
,
numberArrays
):
attribute
=
Xdmf
.
XdmfAttribute
.
New
()
attribute
.
resizeAsFloat64
(
arraySize
)
grid
.
insert
(
attribute
)
hdf5Writer
=
Xdmf
.
XdmfHDF5Writer
.
New
(
"/usr/var/tmp/ajburns/timing.h5"
)
hdf5Writer
.
setFileSizeLimit
(
10000
)
self
.
writer
=
Xdmf
.
XdmfWriter
.
New
(
"/usr/var/tmp/ajburns/timing.xmf"
,
hdf5Writer
)
self
.
writer
.
setLightDataLimit
(
10
)
def
write
(
self
):
self
.
domain
.
accept
(
self
.
writer
)
if
__name__
==
"__main__"
:
timedWrite
=
TimedWrite
()
startclock
=
time
.
clock
()
print
timeit
.
Timer
(
timedWrite
.
write
).
timeit
(
1
)
print
(
time
.
clock
()
-
startclock
)
os
.
remove
(
"/usr/var/tmp/ajburns/timing.xmf"
)
os
.
remove
(
"/usr/var/tmp/ajburns/timing.h5"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment