Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fluidparticles
MigFlow
Commits
a17d455f
Commit
a17d455f
authored
Nov 18, 2020
by
Jonathan Lambrechts
Browse files
missing file
parent
6be42473
Pipeline
#8684
failed with stages
in 1 minute and 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
python/_tools.py
0 → 100644
View file @
a17d455f
import
time
import
atexit
import
gmsh
import
signal
gmsh
.
initialize
()
gmsh
.
option
.
setNumber
(
"General.Terminal"
,
1
)
signal
.
signal
(
signal
.
SIGINT
,
signal
.
SIG_DFL
)
timers
=
{}
def
timeit
(
func
):
def
wrapper
(
*
args
,
**
kwargs
):
self
=
args
[
0
]
tic
=
time
.
process_time
()
r
=
func
(
*
args
,
**
kwargs
)
toc
=
time
.
process_time
()
name
=
func
.
__name__
timers
[
name
]
=
timers
.
get
(
name
,
0
)
+
toc
-
tic
return
r
return
wrapper
atexit
.
register
(
print
,
timers
)
Write
Preview
Supports
Markdown
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