Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
Xdmf
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
Packages
Packages
Container Registry
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
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
Show 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